Iâm quite excited to have successfully migrated my blog from 2 WordPress blogs to just 1 WordPress MU install. I had initially set up 2 blogs running on one code-base using WP-Hive, and while Iâm really impressed with the hive plugin, itâs always felt more like a hack than a true trustable upgradable solution.
My weekend began with, âMigrating from WordPress to MU canât be that hard, can it?!â Boy, was I in for a surprise. I hope this brief post will spare you the pain I went through.
1. Download and Install
First, some good news: the README file does a great job walking you through the process of getting a blank MU install up and running. The default installation process for MU is strikingly similar to the standard WordPress install. A quick unzip of the MU files on your server, a few chmodâs, a fresh mysql database, and everything should be peachy. But thatâs the good news, whatâs the bad news?
2. Importing Your WordPress Data
Now if youâre like me, you might have noticed the tempting âImportâ and âExportâ buttons.
![]()
Donât touch them! These buttons are nothing more than cleverly designed distractions â little pixel sirens â they are not your solution. With my very modest 5.8 Mb export file, I had one hell of a time getting MU to import the thing.
No matter what settings I tweaked, the import timed out after 60 seconds. I changed WPMU settings, I changed PHP max upload size, max timeout, and max memory settings. I ended up splitting the file into over 30 tiny pieces, and still couldnât get it imported.
mind. numbing.
In my dedication slash foolishness, I wrestled with it for about 6 hours split over 3 days until I finally had enough. Maybe youâll want to wrestle with splitting xml files and tweaking random upload settings (or maybe youâre lucky enough for it to just work), but not me. There had to be a better way, and luckily there is.
3. Create a New Blog
Creating a new blog in MU is a super easy process, just click
then the
button. Fill out the form and away you go.
Take special note of the ID that WPMU gives your new blog. The ID is in the left most column of the blogs list.
4. Migrate Your DAta â This Time For Real!
Fire up phpMyAdmin, and take a look at your old blogâs database. Youâll want to export the following tables to a .sql file:
- wp_comments
- wp_links
- wp_postmeta
- wp_posts
- wp_terms
- wp_term_relationships
- wp_term_taxonomy
Remember that ID from step 3? Open up the .sql in your text editor of choice, and globally replace âwp_â with âwp_{ID}_â (where {ID} is your blogâs ID).
Now point your phpMyAdmin at your WPMUâs database. Youâll notice in this database that youâll already have tables with names like âwp_1_postsâ, etc, so prefix all the tables with your blog ID in them with âold_â. The only table youâll skip is âwp_1_optionsâ.
Now that youâve renamed those 7 tables, upload your .sql file into your WPMU database. You should now have a table list that looks something like the image to the right.
5. Fix Author of Posts
Last step! For every author in your old blog (probably just you), create a user in WPMU (if itâs you, itâll be the MU admin). To assign all the posts to the admin MU user, run the following command in your MU database (substitute {ID} for the blog ID):
[code lang=âsqlâ line=â1â˛]
UPDATE wp_{ID}_posts SETÂ post_author = 1
[/code]
6. Done!
Thatâs it! Youâll probably want to log into the admin console and re-enable any plugins you need, and tweak your settings again. We omitted the wp_options table, so this process doesnât import any blog settings at all. I tried importing settings as well, but hit a wall and was plenty happy to manually fix those.
At this very moment I am enjoying 1 admin panel, 1 click install for new blogs, 1 database, and 1 codebase. Simple. Upgradable. Trustable.
Enjoy your WordPress MU powered blog!
