If you have used the WPMU Multi-DB plugin to fragment your databases from a single instance to 16 or more databases, there may come a time where you need to merge all of those databases back into one. In my case, I want to be able to use Backup Buddy to backup and migrate WordPress blogs. Here are the steps on how to accomplish this massive change. Keep in mind, this is a tutorial which is written for informational purposes only. I am not responsible for anything that goes wrong.
Create a new database named myDatabase:
Make a MySQL dump of your existing multisite database:
Next, strip out the MySQL dump lines in the .sql file which tell it to use different databases:
Next, strip out the MySQL dump lines in the .sql file which tell it to create databases:
Change what database is currently “used” when it is being imported:
Import the MySQL dump into the newly created database from step one:
Last, but not least, remove all files which came with the Multi-DB plugin (db.php and db-conf.php)
* Keep in mind that I spent a lot of time scratching my head over why the sites wouldn’t show up in the Network Admin > Sites list. After all kinds of looking around, I found out that my main global database had been overwritten by another database in the –all-databases array which had the same tables.