Migrating single site WordPress installations to a multisite network

I have seen this question about migrating to a networked multisite WordPress install come up more than once so I thought I’d write down my experience. I used to host about 10 individual WordPress installations. Managing them and keeping them all up to date was a pain, and that meant I always had sites that were out of date. So a few months ago I spent some time migrating them all to a new WordPress network installation. That allows you to host multiple sites all in the one WordPress installation. The only problem is that its quite cumbersome to migrate sites into the new site.
I’ve tried to document the overall process. If anything isn’t clear please let me know and I’ll and elaborate.

  1. Backup all your old sites and databases
  2. Go to each site and export the site
  3. Select a suitable main domain name for your new networked WordPress site. When you create a new blog in the network, the admin of the blog will get an email from your multi site saying it was set up, so choose something that is suitable bearing that in mind.
  4. Set up the multi site with subdomain (not sub folder).
  5. Set up apache virtual hosts to direct ALL host traffic to the wp install.
  6. Set up subdomain sites for each site you wish to import.
  7. Install the WordPress MU Domain Mapping plugin
  8. For each subdomain:
    1. Import the old blog
    2. re-delegate the domain or set your hosts file up to point the domain name to your new WordPress network.
    3. On the Info tab in your network settings for the domain, change the Domain to the actual domain you want,
    4. On settings tab, change siteurl to the blogs correct domain,
    5. Change “home” to the correct domain
    6. Check through the list and fix up any other instances of incorrect domain. Save the changes.
    7. Note down the site id (from the url. something like: http://mynewmultisite/wp-admin/network/site-settings.php?id=4  means site ID is 4)
    8. Go to Settings/Domains and in the New Domain section, enter the site ID and correct domain for the new site
    9. Click save and that’s it – the new domain should be working. Test it out.
    10. Fix up all the old links to images. they will currently be links with the old subdomian in them. You can fix them up with the most excelent Search and Replace plugin.
  9. That’s it, you should be done.

It’s a fairly long winded process but it can be done and is worth the effort. Running a networked site instead of many individual installs saves a lot of time in upgrades and  maintenance.
Moving across the plugins and themes is also a bit of a pain. You just have to manually do it per site. There are plugins that are supposed to help move widget settings across but I had limited success with them. “Widget Data – Setting Import/Export Plugin” seemed to add the settings not replace them so you end up with duplicates of widgets and things. it may have improved since I tried it.
I don’t like to site wide activate plugins but WordPress does not have an option like with themes, to only enable a plugin on a per site basis. There is however a plugin for that: Multisite Plugin Manager. With that you can turn on plugins for each site in the Network Admin/Edit Site area. Then you have to go to the site’s dashboard and activate the plugin in there afterwards.
Another useful plugin for a networked site is called “Network Plugin Auditor” it adds a column to the Network/Admin/Plugins page that shows which sites are using each plugin. It also also shows the converse on the Sites page.
There are tools to assist this process also. One such tool that comes highly recommended, that I have not personally used is Backup Buddy. If you have more than a few sites to migrate it may well be worth investing in something like that to help you.

1 comment

Leave a comment

Your email address will not be published. Required fields are marked *