Migrating Your Current WordPress Blog to a WordPress Multisite Blog

Author Bernard Peh at SitePoint has posted a follow-up to his Multisite WordPress tutorial. This time, he’ll show you how to migrate an existing standalone blog into your new multisite setup.

The first thing to do is make some preparations.

Make sure you have the latest version of WordPress installed: we’re up to version 3.1 now. This is important for consistency between installations and also to ensure you have access to the multisite feature. Upgrade WordPress if necessary and ensure the multisite feature is enabled. Check the previous video for details.

Back up all databases for both multisite and singlesite.

Do not activate domain mapping for newsite yet.

This is a good time to do a bit of housekeeping and remove all old spam comments, expired users and unwanted posts on singlesite. You will reduce unwanted content and make your life a little easier later on.

Copy the theme and plugins from singlesite to multisite. How you achieve this depends on how your sites are hosted. You may need to use cPanel or similar, or stand alone FTP.

The next step is to export the content of singlesite to a downloadable file. In the singlesite WordPress admin panel under Tools in the left sidebar, click on Export. Click on the Download Export File button to export the content of the site to an xml file.

Switch your attention to the newsite WordPress installation. To import the singlesite xml file we have just exported, we need to install a plugin. Click on Add New under Plugins in the left sidebar of the admin panel and search for the term “WordPress Importer”. Follow the instructions to install that specific plugin.

Then go to Tools / Import, click on WordPress and upload the singlesite export xml file. Proceed with the import only up to the Assign Authors page.

At this point, you’re given the option to map the authors from singlesite to newsite. This is the most challenging part of the process because WordPress does not allow you to have duplicated authors across different sites in your multisite, so you need a way to identify and resolve the duplicate authors.

To do this, you can compare author usernames and email addresses.

Go to phpMyAdmin for the singlesite database. Duplicate the wp_users table, call it wp_users_tmp and then export this table. Then switch to the multisite database and import wp_users_tmp.

To compare the wp_users table from both databases, run this query on the multisite database to give us a list of all email duplicates.


SELECT t.user_login as singlesite_user, w.user_login as multisite_user, w.user_email
FROM wp_users w, wp_users_tmp t WHERE w.user_email = t.user_email

Now run this query to check for any username duplicates.


SELECT t.user_login as singlesite_user, w.user_login as multisite_user, w.user_email
FROM wp_users w, wp_users_tmp t
WHERE w.user_login = t.user_login and w.user_email != t.user_email

Back on the Assign Author page in the multisite import process, append “_singlesite” or another unique identifier to the existing singlesite username for any case where a user is duplicated.

Check the Download and import file attachments checkbox and click Submit.

Since all users now have unique names, you can compare them against the profiles you have in singlesite. Now, you can manually enter their profile details in the users section.

Re-activate all the plugins and re-setup the widgets in newsite. You can also configure the theme under Superadmin / Sites.

Point your browser to http://multisite.something/newsite/ and check that newsite now holds the content of the singlesite.

Change the IP address of the singlesite domain to point to your multisite host.

Add the singlesite domain as the primary domain under Superadmin / Domains.

Read More:

Advertisements

About rack9

Web Design, Development and SEO from RackNine Inc. View all posts by rack9

One response to “Migrating Your Current WordPress Blog to a WordPress Multisite Blog

You must be logged in to post a comment.

%d bloggers like this: