How to Move a WordPress Multisite Site to a Standalone Installation

Create as many sites as you want in your network
If you find this tutorial too difficult to follow, you can hire me to move a site from a Multisite installation to its own installation.

I’ve had to do this a few times, where I’ve had to move a WordPress multisite site to a standalone installation. For example, I sometimes build new sites on my own multisite network, if the client already has a live site, where downtime is not an option, and then I can move the entire site onto their server and make an immediate switch to their new site.

The process to do this is a bit fiddly, and there’s no plugins (other than BackupBuddy) or built-in functionality that can achieve it, so you’re stuck with doing it manually. Here’s how to do it:

Copying the existing site

There are several elements from the existing site that you’ll need to make copies of. First of all, find your site ID – you’ll need this in a number of the steps below. To do so, do to /wp-admin/network/sites.php and rollover the link of the site you want to copy. The destination URL will end with a query var, like ?id=12. This is your site ID (12 in this case). Remember it.

Open up phpMyAdmin and open up your WordPress database. Click on the export button and select all tables that are prefixed with wp_ID_. Also select wp_users and wp_usermeta. The tables might have a prefix other than wp_ if you changed it for security reasons.

Export the tables to a SQL file and save it locally on your machine. Now open it up for editing in a plain text editor, like TextEdit, or Notepad. Search for the following strings in the file and replace them as shown below:

  • Search for the old domain name and replace it with the new one. For example, replace testsite.theukedge.com with mynewdomain.com in every instance.
  • Search for incorrect file locations. Replace the string yournewdomain.com/files/ and replace it with yournewdomain.com/wp-content/uploads/
  • Search for the word files, and where it references an upload location, change it to wp-content/uploads
  • Search for your old table prefix (like wp_ID_) and replace it with whatever your new one will be. The more random it is, the better, for security reasons. Also search for wp_users and wp_usermeta and change them to the same prefix.

Save the file – it’s now ready for your new site. However, that’s just the database, there’s more to copy yet.

Login to the site using FTP and navigate to wp-content/plugins. Copy all of the plugins that are active on the site to your computer. Now move to wp-content/themes and copy any themes that need to be copied to the new site. Finally, go to wp-content/blogs.dir/ID/files and copy the entire contents to your hard drive.

Now you have everything you need to upload to the new site.

Upload it to the new site

Upload WordPress to the new server and configure wp-config.php with the nonces and salts, database information and your database prefix from above. This will require setting up a database and database user if you haven’t already. Save the file.

Now, navigate to wp-content/themes and upload all the themes that you copied from the old site. Go to wp-content/plugins and do the same with the plugins you copied. Finally, go to wp-content/uploads (you may need to create this directory) and upload everything that came from the old wp-content/blogs.dir/ID/files directory.

Once everything’s finished uploading, log in to phpMyAdmin on the new server and navigate to the database, which should be empty. Click on import and import the SQL file that you edited and saved to your computer. Once uploaded, you should see 11 tables (plus any extra tables created by plugins) in your database.

You are now set to try out your new site. Navigate to your site and check that it loads correctly – be sure to check a lot of your pages, particularly ones where plugins interact with them (such as contact forms, or slideshows). Then try logging in and make sure that you can navigate the backend correctly.

Now your old Multisite site is its very own WordPress site that you can hand off to a client.

Did you manage to get through this? Are you stuck and need help? Let me know how it went in the comments.

17 thoughts on “How to Move a WordPress Multisite Site to a Standalone Installation”

  1. Julius says:

    There are a lot of things that can go wrong with moving a WordPress site. I did this a couple of times and I noticed that most often the problem can be because of a absolute or relative local path that was not updated in the database.

    The number two factor that can lead to errors is that some wordpress plugins just act funny after you move the site. I didn’t figure the exact cause of this but I noticed that if you disable the plugin in question the site works. You can just reinstall it and everything is ok. Who knows it might be because of different file permission rights.

    1. Yes, obviously there’s always potential for issues when you move between different servers, because they can be configured differently, but I’ve used this method a couple of times without issue. I don’t doubt that issues can occur, but with common server setups, I don’t think it should cause many problems. Absolute vs. relative paths will definitely be an issue though. I try to avoid relative paths in general, and try and use bloginfo(‘wpurl’) to get the site address, so that it changes when the site moves. Just a few little things that you can do can make like easier.

  2. Brad Dalton says:

    Did this myself recently and used backupbuddy.

    Looks like its easy to do it manually as well but would take a lot longer.

    Like your What next? box. How did you make that?

    1. I built it to go with my new theme. I was actually considering doing a tutorial about it. Since there’s interest in it, I suppose I will. Watch this space :)

  3. Ray says:

    Dave,

    Great article. Wondering if you can tell me how to easily move or clone a local single wordpress blog to a live multisite sub directory install. I develop locally and want to move the site to a multisite sub directory install so my client can see the site. Even if you know a plugin that can do this easily It would help.

    I appreciate any help.

    1. In that instance, you could just use Tools > Export and then create the new site on Multisite and performs Tools > Import. BackupBuddy may also help

  4. emilierv says:

    GREAT walkthrough, thank you!
    I recently gave a small project to my students and offered to move their site to their own install after the class was over. Just used this and took a few notes :
    —–
    [quote]Search for incorrect file locations. Replace the string yournewdomain.com/files/ and replace it with yournewdomain.com/wp-content/uploads/[/quote]

    I didn’t have anything with a subfolder called /files/ so skipped that step. Maybe the last / is a typo?
    —–
    [quote]Finally, go to wp-content/blogs.dir/ID/files and copy the entire contents to your hard drive.[/quote]

    For me, this was in wp-content/sites/ID/files, didn’t have a blogs.dir (WP3.5.1)
    —–
    I had a lot of students on the Multisite install so I also deleted all the extra users
    —–
    I also had to repaste the CSS from the “custom CSS” plugin I had installed on the multisite (you’re not supposed to be able to do custom CSS otherwise) in the editor.

    One problem I had was that the theme options had not followed as well as the widgets. Got any suggestions for next time?

    1. emilierv says:

      I forgot to add, I also had to put the permalinks back in the default structure and then back to what they were (links were broken).

    2. Widgets and theme options are serialized, so sometimes that data can get messed up when you do search and replace. Tools like BackupBuddy and WP Migrate DB Pro can handle this for you without messing up the DB. I plan to write tutorials on these soon. Thanks for adding your experiences here for other to see and learn from.

  5. duub says:

    great tuto! i’ve made some adaptations to work but was a great guide to achieve it!
    a detail that i’ve want to improve is that following this steps all the users of the multisite are moved to standalone and get some kind of permissions. that happens because in wp_usermeta when replacing wp_x_ to wp_ instead of your suggestion of random string are mixed with the existing wp_ in the original table, maybe i’ve to take your advice.

  6. Yazmin says:

    Thank you! This was exactly what I needed (and I searched for a while!) It could have been a little clearer in presentation, but it’s hard with so much information and detail. I did run into an issue, but was able to fix it myself.

    Thanks Again!

    1. Thanks Yazmin. If you would, please share your issue here in case anyone else encounters the same issue.

      1. Yazmin says:

        Actually, I think it was already touched upon in the comments – about the “wp-content/sites/xx” versus “files”. The rest was just a bit of difficulty on my part keeping track of where I was in the process. Thanks!

  7. kpsupport says:

    would i be correct in saying that the user table wouldnt be transfered?

    1. No. My instructions tell you to copy all tables that are prefixed with wp_ID_ as well as the wp_users and wp_usermeta tables.

  8. Yazmin says:

    Hi Dave – Did you ever write your tutorial on dealing with widgets and theme options when migrating? Thanks!

    1. I didn’t, but WP Migrate DB Pro now supports moving a multisite site to a standalone installation, including widgets, theme options and all. I’d check that out

Leave a Reply