Whether you’re migrating WordPress from one host to another or changing the structure of your WordPress multisite network, it can go smoothly or it can become very complicated with all sorts of variables. There are multiple parts, from changing DNS entries so that your domain names work with the new server, transferring the attachments like photos and videos, and migrating the database.
This isn’t a how-to guide for migrating your WordPress site, and the tools below won’t take care of the migration for you. There are other places better for that (starting with the WordPress Codex. Good hosts will have detailed guides specific to their systems or may even handle it for you. And if you’re unsure of what you’re doing, simply don’t want to mess with it, or simply can’t risk site downtime, there’s the option of paying experts to take care of it.
UPDATE: I originally wrote this some time ago, and since then, I’ve moved all my sites to Kinsta. They’re a premium managed WordPress host, but if you’re in the market for that, I highly recommend them. While they do include blog migration with their plans, I have ended up moving a number of my sites myself to speed things up and because it’s so easy to do with their tools. They recommend the WordPress Duplicator plugin, which is what I’ve been using.
I recently moved a WordPress multisite network from Synthesis to WP Engine. I wanted to take an existing multisite network that I use for client sites and split it into two. This site is hosted by Synthesis for this site, and I’m very happy with them. I would rather have kept all my sites together there, but Synthesis no longer supports creating new multisite installations. And since I didn’t want to carve each site out separately, I had to look for another alternative that did support multisite. Which led me to WP Engine. So my process ended up being not only splitting a multisite but also moving it from one host to another. To make it even more complicated, I also wanted to convert one of the resulting multisites from a subdomain to a subdirectory setup. All of which created lots of opportunities for URLs to break and WordPress’s database to lose track of things.
But these are some of the plugins and tools I found useful for various aspects of the migration. Most of these are the kinds of tools you’d only use while you’re doing the migration and aren’t plugins that you’d necessarily want to keep activated all the time. With the exception of the Redirection plugin, all of the plugins below are ones that you can activate to use and then remove.
Copying the WordPress Database and Files
There are two parts to backing up or copying a WordPress site. It’s not as simple as just transferring files; you also need to get the database as well. There are quite a few plugins that will handle that, but not all of them work comfortably with multisite installations.
This worked very well for duplicating blogs within a multisite and was very handy for creating a copy from, say, a subdomain to a subdirectory so that I could mess with the new version and get it up and running while effectively keeping the original as a backup.
Link: Blog Copier
This is the one I’ve been using more recently and have found it to be rock-solid. The free one doesn’t work with multi sites, but the paid versions do.
Link: WordPress Duplicator
Domains and URLs
If you’re moving your domain or changing the structure of your multisite installation from a subdomain to a subdirectory or vice versa, chances are you’re going to want to redirect from old URLs to new ones so that your visitors and search engines don’t just hit 404 errors.
There are a number of ways of doing this. Some of the popular SEO plugins like Yoast SEO Pro and SEOPress Pro also include redirection tools, but in some cases they don’t include sophisticated tools such as support for regex expressions. And for a site with a long history, like this one, where things have moved and been updated over time, those more advanced tools come in very useful.
For that reason, as much as I’d like to reduce the number of plugins and combine features, for something like this I use the dedicated Redirection plugin. As well as simple URL to URL redirects, it also has all sorts of other powerful features built in, including things like being able to automatically capture URL changes as they’re made. But if you’re needs don’t need those bells and whistles or you’d prefer to do it without another plugin–or perhaps your host frowns upon the Redirection plugin (I’ve come across some that do)–another good option is to build the 301 redirects directly into your .htaccess file. Doing that can be all sorts of powerful–and complicated. Here’s a really good overview of the basics put together by the folks at Woothemes. That said, using .htaccess doesn’t work on every server—it’s most commonly used on Apache setups.
There are very powerful ways to use regular expressions to handle redirects, a topic that can (and does) fill a whole book. But a basic 301 redirect simply points from one old URL to a new one. Its syntax is simple enough. But what if you’ve got dozens, hundreds, or even thousands of URLs you want to redirect and, for whatever reason, using regular expressions isn’t a good fit? You could do it manually line by line, but that’s going to get very tedious very quickly. Here are a couple of tools that work well together to help you build a batch of multiple 301 redirects quickly, easily, and safely.
List All URLS
The name of this plugin is pretty self-explanatory, and it works great for generating a list of individuals URL if you’re planning to use them for 301 redirects. It will take a list of your URLs and spit them out as a plain text list that you can then copy and paste. You can specify things like all URLs, just pages, just posts, or just specific custom post types. Some sitemap plugins can do something similar, but the attraction of this one is that it keeps the results clean and simple for copying and pasting as plain text.
Link: List All URLS
Batch Rewrite Generator
This is an online tool made available by Jesse Donat. Basically, you paste in your old and new URLs and the generator will spit out properly formatted redirect rules that you can then copy and paste into your htaccess file (redirects often need to go near the top of the file to work properly). Sure, you could do it yourself if you’re handy with rewrite syntax, but this once again takes the risk out of it and can be a huge timesaver.
The List All URLs plugin above gets you part way there by generating the list of old URLs. What you need to do then is paste that into something like Google Sheets or Excel in one column. In the column next to it you want to add the corresponding new URL. With some copying and pasting and some quick find/replace you can have this done in seconds. Once you have those two columns, copy and paste them into the generator.
Link: Batch Rewrite Generator
Velvet Blues Update URLS
Updating the domains is one part of the process, but if you’re making any moves there’s a good chance your URLs to internal resources like photos or videos embedded in posts might be broken. In my case, I was moving parts of the site to a subdirectory. Even after copying over files by FTP, I still had to update the SRC code within the posts themselves so to get photos to show up.
One option is to use something like Search and Replace or Better Search and Replace. Both work very well, and if you’re comfortable using them–and have a full backup of your site–go for it. The potential downside is that they can actually be too powerful, and if you make a mistake you can end up with unintended consequences by changing database tables you didn’t mean to change. Velvet Blues Update URLs does basically the same thing but makes it a little more user-friendly by having options that make clear what they’re for rather than using cryptic database table names. So you can choose update URLs in excerpts, page contents, in links, or attachments etc. Basically, it reduces the risk of messing things up. But with any of them, bear in mind that they modify the database directly and there’s no undo function. So make sure to have a backup.
Link: Velvet Blues Update URLs
I found that post-migration many of my photos weren’t showing up in the media library. The files were there and could be confirmed through FTP, but they weren’t registered in WordPress’s media library anymore.
The name of the WordPress Flash Uploader plugin doesn’t seem especially relevant to this, but it turns out that whereas many of the best plugins are one-trick ponies that do their specific trick very well, this is actually a combination plugin that has two major parts. One controls the way in which images can be uploaded into the media library. I haven’t tried that part and don’t need it. But sitting quietly alongside it, the other part of the plugin is a feature to synchronize your media library with the files that are actually on the server. It doesn’t actually reimport them, so they stay in the same filenames and folders, meaning the URLs of your embedded photos and videos shouldn’t break.
When it works, it works as intended. But I also found that sometimes it just got hung up with a white screen. So your mileage may vary, but it did solve the problem for me so that my photos suddenly reappeared in WordPress.
Link: WordPress Flash Uploader