• I’m running a Bitnami MAMPStack on development and can use v-hosts the set up multiple subdomains pointing to localhost. My objective is to have multiple sites using different databases & theme files but share plugins, media library resources. I had been planning to put some conditional logic in wp-config.php to switch databases depending on the SITEURL but all the advice semss to be at the very least you need to make a separate wordpress installation per database. Even if I do this at the wp-content level rather than htdocs or the whole MAMPstack I’ll still have to grep through all the plugins for instance that reference an absolute path replacing /Applications/Mamp-x.x.x-x/apps/wordpress/htdocs/wp-content with /Applications/Mamp-x.x.x-x/apps/wordpress/htdocs/wp-content2. Probably be loads of complications with database updates too. A network multisite on a multisite plugin seem to all use one database with multiple table name prefixes – problem is I don’t know if my sample-data theme import wizard will support anything other than an import to a wp_ prefixed table. Any ideas out there?

The topic ‘One wordpress development environment switching databases depending subdomain’ is closed to new replies.