Migrate from WordPress to WordPress MU – How to

Migrate from WordPress to WordPress MU – How to

Scenario: http://iTechEngine.com

WordPress Version 2.8.6

4000+ Posts, 20+ Categories, 800+ Tags, 150+ Comments, 500+ Users, 200MB + Database, Over 300 MB of Images, plugins and themes.

One day I thought of dividing my blog to several new, customized blogs and started migrating it to WordPress MU.

Though I was successful in migrating one of my blog from WordPress to WPMU, this time I am facing lots of issues around this migration. I was taking help of Adam Wulf and Reverend posts on migration of WordPress to WPMU. Thought of writing my own post on this.

So here we go…

1. Download and Install WPMU.

If you are a new to this installation take help. Make sure that you create a new blog in WPMU and note down the Blog ID.

blog id

 

2. Export your database from phpmyadmin. Do not use Import Export functions from WordPress if you have a big DB. Export your DB using Export function in phpmyadmin from your Source blog, i.e. the blog you want to migrate to WPMU. Export following tables to a .sql file. Make sure you SKIP all other tables at this stage.

wp_comments
wp_links
wp_postmeta
wp_posts
wp_terms
wp_term_relationships
wp_term_taxonomy

3. Open up the .sql in any text editor I used WordPad, and replace all “wp_” with “wp_[ID] _” (where [ID] is your blog’s ID). In my case and in most of the cases it is 1.

 Replace wp_     with     wp_1_ Save the .sql file.

replace

4. Go to WPMU phpmyadmin and prefix all the tables with your blog ID in them with “old_”.

e.g.  wp_1_posts to old_ wp_1_posts

rename_db_tables

 Please skip the table“wp_1_options”, else you might get in trouble.

5. After this it’s time to upload our old DB from WordPress installation to WPMU DB. Which we just edited and saved as .sql file.

Tried importing it in my WPMU DB directly from my Desktop it was taking lot of time to upload and time out is occurred many times. So I decided to look for some tricks and here is one…

 Googled for “How to Import Large MySQL Data Files” and found following.

 BigDump Please take advantage of this to import your DB.

Please read this carefully. After all this I have uploaded my DB .zip on the server in the folder called dump in which my bigdump.php is located. Then I unzipped the .sql file in the dump folder and imported the DB by accessing bigdump.php. I think this is like a miracle my DB was imported in less than 5 minutes and without any error.

 

bigdump 

6. Time is to copy all themes, plugins, Images and uploads to new WPMU directory. Copy all these files to their exact locations.

7. Now I wanted to import settings of my wordpress installation. Exported wp_1_options table from wordpress DB and replaced wp_ with wp_1_ and saved this a .sql file. (see step 4) 

Renamed wp_1_options table in WPMU to old_ wp_1_options. Imported the edited DB.

PLEASE CAREFULL ABOUT ABOVE STEP, I AM NOT SURE THAT THIS WILL ALSO WORK FOR YOU.

Same way I had imported the wp_users table, to import the user details.

8. Done

This is what I had learned from my RnD on Migrating from WordPress to WPMU. 

2 Comments

Leave a reply

TechEggs
Logo