Migrating Multiple Blogs into WordPress Multisite

Migrating Multiple Blogs into WordPress Multisite

Managing multiple WordPress installations can be a drag. Remembering different sets of usernames and passwords, and having to install plugins and themes over and over again. Ain’t nobody got time for that.

Setting up a fresh WordPress Multisite installation and creating new sub-sites isn’t all that hard, but what about migrating an existing collection of sites into a new or existing Multisite installation?

There are many reasons why you might want to do this, for example you can:

  • Save time. Instead of installing and upgrading WordPress, themes and plugins across many sites, you can do all of these things just once.
  • Easily manage your clients’ sites. If you manage sites for multiple clients, Multisite allows you to control all of your client sites from one place.

So how exactly do you migrate multiple blogs into Multisite? Let’s get started.

Migrating birds

Like birds in migration, you too can easily migrate (your blogs, that is).

Basic Housekeeping

It’s best to start with some good ol’ fashioned spring cleaning.

Login to each of your single sites and delete old users, unwanted posts and spam comments. Doing this not only helps to reduce unwanted clutter, but will also keep your site trim for when you export it later. We’ll get to that further into this post.

Some plugins can conflict with the export process, generating an empty file or a partially complete file. It’s best to disable the plugins on your single-site blogs while you’re tidying up your sites.

Backup Your Sites

The next step is to back up your blogs in whatever way you are most familiar/comfortable with, whether you prefer to use cPanel, a database backup plugin like WPMU DEV’s Snapshot, a third-party site like VaultPress or just manually copying all your site’s files to a folder on your computer. This step ensures your site isn’t going to be lost if something goes wrong and you can easily restore it.

Export Your Blogs

Export your posts and pages with WordPress Exporter.

For each of your single-site installations, go to Tools > Export. Select All Content and click Download Export Files. This will export all of the posts, pages, comments, custom fields, terms, navigation menus, and custom posts for each site into a .XML file.

Keep in mind that widget configuration and blog/plugin settings, as well as your logo and menu navigation selections, are not exported in this method. It’s a good idea to make a note of these settings so you can edit them back later on.

Set Up Multisite

If you haven’t already got a Multisite installation set up, do that now. Get the latest version of WordPress and head over to the Codex for a full rundown on how to create a network.

Create Sites For Each Blog You Want to Import

Create a new site for each of the blogs you want to host. Go to My Sites > Network Admin > Sites and click Add New.

Enter in the site address, site title and admin email for each site, keeping consistent with your existing site names. It’s good to be absolutely sure before you click Add Site to confirm the details for each site because you don’t want to have to go back and rename your sub-domain later.

Import the Files For Each Blog

Go to the backend of each blog in your Multisite installation and import the corresponding .XML file you exported earlier (Tools > Import).

If you don’t already have the WordPress Importer installed, WP will prompt you to install it.

After you click Upload file and import, on the next screen check the box that will pull in photos and other attachments. If your media is still accessible on our single site installations, the WordPress Importer attempts to download them from the original server. WordPress export files don’t include the attachments in the backups file, just the posts and pages.

Copy Theme and Plugin Files

Copy any plugins and themes from your single site installations to the corresponding plugins and themes folders in your Multisite setup.

The next step is to copy the theme and plugin files from your single site installations to their respective new directories in your Multisite setup.

It’s easiest to do this via FTP or in cPanel using File Manager.  Open up the wp-content folder for your Multisite installation and then go to Plugins. Copy the plugins from each of your blogs into this folder.

You will then need to network activate your plugins.

Do the same for your themes. Open up wp-content/themes and copy your blog themes into this folder.

It’s best to check your plugins are compatible with Multisite before copying them across. If a plugin is not supported, search for an alternative in the WordPress Plugin Repository

Edit the Configuration Settings For Each Site

Your widget and plugins settings, as well as your preferred menu navigation, will be lost for each site and unfortunately, there’s no way around this. You will need to reconfigure these settings for each of your sites so you can get them looking exactly as they did before.

This means updating the Customize options in the Appearance > Themes section, updating your logo and navigation, repositioning your widgets, and editing the settings for each of your plugins.

Wrapping Up

While merging your sites into a Multisite installation can be a bit fiddly, once you’ve got everything set up, you’ll save heaps of time in the long run on things like installing and updating plugins and themes.

Migrating your sites should be a fairly straightforward process if you follow the steps above.

Why do you use Multisite? Tell us in the comments below.

Image credits: Serge Melki.