Migrating Your Current WordPress Blog to a WordPress Multisite Blog

By Bernard Peh
We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now

Last month, I wrote and presented a video about how to host multiple sites in WordPress 3.0. This raised the question of what to do if you already have multiple WordPress sites and would like to bring them together to leverage the power of the WordPress multisite feature.

Until recently, migrating all your blogs to a single multisite blog was a massive task because of the need to resolve conflicting IDs across different tables. Fortunately, newer WordPress versions have built-in functions to make life a bit easier for all of us.

You’ll find the official WordPress multisite migration documentation here, but I’m going to give you a summary of the process here, plus another video on the topic. Here’s the video:

In this summary, I will use “multisite” to refer to the master WordPress blog, “singlesite” to refer to the single WordPress blog that you want to migrate over and “newsite” as WordPress installation that acts as a placeholder site in a subdirectory under “multisite”. The content from the “singlesite” will need to sit in “newsite” before domain migration occurs.

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.

This migration process is much more complicated than the previous process and I suggest you watch both the first and this latest video to thoroughly familiarize yourself with the process before you tackle it.

I hope this will help you if you are thinking of migrating your WordPress blog. That’s it for now.

We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now
  • wp-guy

    migrating a single blog to a multisite has always been complicated. I think this is the first video made addressing the issue.Thanks for sharing and clarifying the complexity although I like to see a more complicated example.

  • Partha Bhattacharya

    I need help, Bernard. I’ve a blog in Blogger (own domain) which is kind of news portal. I now want to shift it as a WordPress multi-site blog where each section is supervised by one designated person.
    I’ve searched how to do this, and indeed there are tutorials on shifting from Blogger to WordPress. But I’m not very clear on this.
    Can you please direct me to some good tutorials..?
    Thanks in advance.

    • if i am understanding you correctly, by each section, you mean each subsite, ie yourdomain/section1, yourdomain.com/section2..etc.? If that is the case, then this can be easily achieved. You just need to manage your users from superadmin->sites

      • Partha Bhattacharya

        Thanks Bernard. Yes, it’ll be like that. For example, mysite.com/movies, mysite.com/technology, mysite.com/local, etc.

        Presently, the website (own domain) is with Blogger’s free hosting. I want to transfer the whole of it from Blogger to self-hosted WordPress blog where each section will be administered separately.

        Please suggest how can I proceed? Thanks again for your time.

  • Alexa

    Hi Bernard,

    Thanks for the video. I’m new to all this and trying to wrap my head around my particular situation/solution. I have a free WordPress.com blog with its own domain (registered through WordPress.com). My blog is very broad, and over two years I’ve found certain categories are more popular than others. One in particular I would like to break off from my main blog and give it’s own domain/identity (and a .com). I.e.: my blog is blogthings.org and I want to take blogthings.org/food and make it food.com (these are just dummy examples, but I’d be happy to link to my actual blog).

    I would like to move from WordPress.com to self-hosted using WordPress.org, so I can use more themes and customize more flexibly. What I’m wondering if how to take my current single blog (on WordPress.com), migrate it to self-hosted and then take the /food category and break it off into it’s own blog w/ a new domain (not a sub-domain). Is it possible to “break off” a category like that and/or point a new domain just to that part of my blog? (ie: food.com merely redirects to blogthings.org/food).

    Any insights would be appreciated! Thanks.

  • Thanks for the great videos – really helped me out.

    Couple of extra tips I’ve picked up doing this:

    1. Using ProFTPD instead of Pure-FTPD on your server, makes a massive speed difference to updating WP and Plugins, and seems to eliminate the WP Updating Crashes that started around WP 3.x

    2. When parking a domain in CPanel, chose your WPMU domain from the list or just type it in (without the /subfolder/) and then type in the domain you want to park on the right.

    3. If your migrating an old WP to the new WPMU, you might need to terminate the old WP domain in CPanel first so you can park it. Obviously make sure you have everything off the old domain first.