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.
- Backup all your old sites and databases
- Go to each site and export the site
- 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.
- Set up the multi site with subdomain (not sub folder).
- Set up apache virtual hosts to direct ALL host traffic to the wp install.
- Set up subdomain sites for each site you wish to import.
- Install the WordPress MU Domain Mapping plugin
- For each subdomain:
- Import the old blog
- re-delegate the domain or set your hosts file up to point the domain name to your new WordPress network.
- On the Info tab in your network settings for the domain, change the Domain to the actual domain you want,
- On settings tab, change siteurl to the blogs correct domain,
- Change “home” to the correct domain
- Check through the list and fix up any other instances of incorrect domain. Save the changes.
- 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)
- Go to Settings/Domains and in the New Domain section, enter the site ID and correct domain for the new site
- Click save and that’s it – the new domain should be working. Test it out.
- 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.
- 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.