Moving a blog between WordPress multisite installations
There are plenty of articles online describing how to move a blog out of multisite into a standalone WordPress.
In this article I’ll describe how to move a blog/subsite from one WordPress multisite installation to another.
I’m assuming your new multisite is already set up, so I won’t cover that setup itself here.
The process breaks down into the following stages:
- Moving the media library
- Moving posts, pages, drafts, menus
- Moving widgets
- Moving plugin library content (NextGen library, Revolution Slider, Photo albums, etc.)
- Applying options and settings.
The whole thing takes an hour to two.
To keep things simple, I’ll cover moving site content from the old mulstisite-<strong>A</strong> into the new multisite-<strong>B</strong>. multisite-<strong>B</strong> needs to have the same set of plugins installed as mulstisite-<strong>A</strong>.
We’ll also need the following plugins for this:
Install them before you start, on both mulstisite-<strong>A</strong> and multisite-<strong>B</strong>.
1. Prep stage
Before doing anything, make backups of both sites and their databases.
Now you can start messing around.
Log into the multisite-<strong>B</strong> admin and create a new site. Enabling users and plugins is optional.
Next you need to figure out the site id on both mulstisite-<strong>A</strong> and multisite-<strong>B</strong>.
The site id determines where the uploads folder sits, the table prefix in the database, and the plugin file storage. I won’t get into plugins here.
The fastest way to find the id is the browser’s address bar. Open the site edit page. The address bar shows the site id right there - you’ll need it later.

In my case the new site multisite-<strong>B</strong> has id 39. Same way, find the site id on mulstisite-<strong>A</strong>. In my case - 10.
2. Moving the theme
The easiest step. Check the enabled theme in the site settings, grab the theme folder from mulstisite-<strong>A</strong> (/wp-contents/themes/theme_name) and move it to the new mulstisite-<strong>B</strong>. Make sure the theme isn’t a child theme.
To check, open styles.css and look for a stylesheet import from another theme:
@import url("../<strong>theme_name</strong>/style.css")
After that go to the site settings page in the mulstisite-<strong>B</strong> admin. On the Themes tab find the one you need and enable it for the new site.
3. Moving the media library
This step has a bit of a catch. WordPress forums are full of posts about media library problems after moving a site to a new server. In practice people end up with an empty admin screen where the list of every uploaded image, document and so on should be.
The experts suggest looking for salvation in one of these plugins:
I tried them and successfully broke the whole media library. Good thing it was on my own site and not a client’s. The thing is, files in the uploads folder are laid out according to their upload date. So a file uploaded on September 10, 2015 sits in this folder:
/wp-content/uploads/2015/09/10/file_name.jpg
Each of these plugins scans the folder you give it and lays the files out in uploads according to the file’s creation date. That’s fine if you never edited or copied files out of the uploads folder. Otherwise, plenty of files can end up in a different location, and your site’s pages will start showing artifacts marking a missing file. Commonly known as broken links.
To avoid that - we’re going to look at the root cause, grab the bull by the horns, and pull it by the tail into a long box.
For a clean media library transfer and import, it’s best to copy the files by hand and copy the media library metadata with a mysql query.
Quick reference:
WordPress stores a lot of information in the wp_posts table. The name suggests posts live there. You’d expect pages to be there too.
It might surprise you, but the info about uploaded files lives there as well.
In the mulstisite-<strong>A</strong> site folder, go into the uploads directory for the subsite you care about. The exact location may differ depending on the site settings, but it’s easy to find since it has the site’s id in the name. In my case it was:
/wp-content/uploads/sites/10
Use the same principle to find the uploads folder on mulstisite-<strong>B</strong>. In my case it was:
/wp-content/uploads/sites/39
Copy all the files and folders from one site to the other.
After that you can check the new site’s admin to confirm the media library is empty.
Now it’s mysql’s turn. I’m assuming you know your sites’ database table prefix. By default it’s wp_. With multisite, the site id follows the system table prefix. In my case all tables in the database tied to the source site had the prefix wp_39_. All tables for the new site had the prefix wp_10_.
It’s convenient if both sites’ databases live on the same server. If not - dump the posts table on the source server and load it into an empty database on the new server. Here’s how to dump/snapshot a table:
mysqldump -u’root’ -p db_name wp_39_posts > db_name-wp_39_posts.sql
Once both tables are in neighboring databases, connect to the mysql console as a user with permissions to work with both databases and run the following queries:
insert ignore into db_name.wp_39_posts SELECT * FROM old/temp_db_name.wp_10_posts where post_type = ‘attachment’;
insert ignore into db_name.wp_39_postmeta SELECT * FROM old/temp_db_name.wp_10_postmeta where meta_key = ‘_wp_attached_file’;
insert ignore into db_name.wp_39_postmeta SELECT * FROM old/temp_db_name.wp_10_postmeta where meta_key = ‘_wp_attachment_metadata’;
Obviously swap in your own database names and prefixes.
After that you can check the media library to confirm the result.
That’s it for media files.
4. Moving posts, pages, drafts, menus
You’d think: Why not just move everything from the posts table into the new database and be done with it?. With that approach I lost the menus and post categories, but those transfer just fine with WordPress’s built-in import/export tool. You’ll find it in the admin under Tools.
Make sure you’re in the admin of the specific subsite you’re working with. Do not export everything from the source site and import it into the root of multisite B.
Export everything from the site on mulstisite-<strong>A</strong> and import it into the new site (mulstisite-<strong>B</strong>).
No need to check the following box - we already copied the uploads folder:

Wait for the import to finish - it should end with this message:
All done. Have fun!
You can ignore any message like this:
Failed to import Media
After that all your posts and pages will be available in the corresponding sections of the subsite admin.
This import/export tool is a strange beast. It drops every iframe element. Fine if there aren’t any on your site’s pages. If there are - check every page carefully. To do that I opened the import xml file in a text editor and searched for the word iframe. Every element in that file has a post id and type. Pay attention to entries of type post and page. You can ignore all drafts and revisions.
As you’d expect, since the site ID changed, all images and other files now have broken links. To fix that we’ll use the Velvet Blues Update URLs plugin. It replaces old URL’s with new ones.
I don’t think I need to explain what goes where. Once it’s done it’ll say:

5. Moving widgets
To move widgets we’ll use the Widget Importer & Exporter plugin. It’s in the admin’s tools list, below the default exporter:

Export the widgets from the source site. It’ll offer to save a file with a wie extension. Go with it.
Your widgets might also have images with old links. Unfortunately Velvet Blues can’t handle those. I tried updating the links in the database by hand and ended up losing all the widgets. I didn’t bother figuring out why, just reverted everything back.
For your widgets to end up with correct links, it’s better to edit the saved wie file in any text editor before importing and replace the old page links with the new ones (where needed).
In the file all the special links are backslashed, meaning they have a \ (back-slash) character in front of them. The back-slash is also a special character itself, so you may need to double up every \ in your find-and-replace field. Depends on the editor and its find-replace mode.
Next, on the new site, enable all the plugins to match the old one. Make sure all the plugins you need are enabled in the subsite’s own admin.
Once all the edits are done, you can safely import the wie file into the new subsite.
6. Moving plugin library content (NextGen library, Revolution Slider, Photo albums, etc.)
Unfortunately I can’t cover the data transfer for every plugin in this article. What I can tell you is that most plugins have their own import/export tools.
Leave a comment about whatever problems you run into and I’ll take a look and try to help (as much as I can).
7. Applying options and settings
The final stage is applying the site’s options.
Under Appearance enable the menu to match the current settings of the source site. Every item should be there, just inactive.
Also double-check Settings:
- General
- Reading
- Permalinks
Epilogue
To wrap up - one article can’t cover every gotcha of moving blogs between multisites. This article is based on one specific case, with one specific client. Along the way I ran into problems with several plugins. The problems were tied to the change in how links worked.
If you run into any problem doing this - leave a comment with a detailed description and I’ll take a look.

