How to Split a Multisite Into Single WordPress Websites

Stormtrooper Clones

Multisite can be an extremely efficient way of creating multiple WordPress sites that can be administrated centrally, but you may have a need to split multisite installations down into individual WordPress websites. For instance, you may have seen the light and decided that ManageWP is a much better option under many circumstances šŸ˜‰

Fortunately, Automattic have been streamlining the process for splitting off individual sites and it is far easier now than ever before.

Letā€™s take a look at the steps required to split off a site and move it to its own installation.

Note: this is one potential solution, but in reality, multisite can get very complicated. Another tutorial we recommend can be found here.

A Little Info About Multisite

Those of you that build websites for clients or have multiple sites and projects may have come across WordPress Multisite before.

Using Multisite allows you to create numerous websites in one installation separated either by sub-domains (such as those used withĀ WordPress.com) or directories (such asĀ http://mywebsite.com/mini-website/). These sites can then be reached using your chosen structure or by domain mapping individual URLs with relative ease using a few DNS tweaks.

Multisite used to be its own flavor of WordPress but in recent versions it has been rolled into the core software and can be activated with a few additions to your wp-config file. The instructions for doing so can be found in theĀ WordPress Codex.

Multisite installations are administrated from a central point. This allows you to use one set of plugins and themes for all of the sites as well as having one Super Admin to easily maintain them all. For developers and those who want to have a greater control over their sites without having to login to multiple installations, this centralized form of control is a useful feature.

Backing Up Your Multisite Installation

Before you even consider exporting the site or setting up a new WordPress installation there is one vital step that you must carry out.

Back up everything! I honestly can’t emphasize that point enough.

If this process goes wrong for any reason, (power failure/web-host server crash/alien invasion) and you donā€™t have a working backup, you are in big trouble. Backup your Multisite installation and make sure that you can restore from that backup.

If you donā€™t have a backup system in place then get one and test it before you go any further. I recommend VaultPress. It comes with an annual or monthly fee but is one of the best WordPress backup system out there. Of course, if you move your new site over to ManageWP then automated backups are included in the subscription.

Exporting Your Site From the Multisite Installation

Now that you have a working backup of your installation you are ready to move onto the next step — exporting your site.

With the latest versions of WordPress, exporting and importing site information has greatly improved. That improvement makes this whole process far easier than it used to be.

Simply login to the site you need to split away from the multisite installation, and in the dashboard go to Tools > Export.

WordPress Export

In the export screen select to export ā€œAll contentā€. This will create an XML file with all of the data from the site needed in order to move it to its own installation. When you click the Download Export File button, the exporting process will begin and then download the XML file to your computer when it is completed.

Once you have the XML file, the next step is to copy the theme and any plugins you use on the site. You can do that by logging into the web host using an FTP application (such as FileZillaĀ — my app of choice). The plugins and themes are found in the wp-content directory — a copy of all the ones you are using for this site should be downloaded to your local computer.

You now have all of the necessary information from the Multisite installation to begin creating the new site.

Creating The New WordPress Installation

Whether you are moving the site to a new host or to a new server with your current host, you need to create a brand new WordPress installation. This is just the usual, extremely simple WordPress installation that should only take you a few minutes. The installation instructions can be found in the WordPress Codex.

Once you have the new site installed you need to login as the site admin and delete the ā€œHello World!ā€ post, the ā€œSample Pageā€ and the sample comment that WordPress creates during the installation. Before you begin the import process you should also change your permalink structure to match the Multisite version. This setting can be found in Settings > Permalinks.

Now that this fresh installation has had a few basic settings configured, you should then go to Tools > Import and select the WordPress option on the bottom of the list.

WordPress Import

This will prompt you to install the WordPress importer plugin. Do so. After the importer is installed you can select the XML file you wish to import. This file is the one you previously downloaded to your local computer from your multisite installation.

With the file selected, click the Upload and Import button. You will then be taken to a page that allows you to assign authors to the posts and pages you are importing.

There are three options at this point:

  1. You can import the user accounts associated with the posts.
  2. You can create a new user during the import that will be given a random password and assign the posts to it.
  3. You can associate all of the imported posts and pages with a user on the current site.

On this page you are also given the option to download and import the attachments from the Multisite installation. This checkbox should be ticked. This will grab all of the media files currently associated with your posts and pages and then create the correct structure for them in the new site.

The Final Stages Of The Site Move

Once this import has completed, itā€™s time to upload the theme and plugins you copied from the multisite installation. Using your FTP program of choice, upload the theme folder you previously downloaded. This should go in the new wp-content/themes/ folder. You also need to upload the plugins you downloaded to the wp-content/plugins/ folder.

The theme and plugins you upload will need to be activated and the settings on them all will require reconfiguration.

An easy and safe way to match the previous settings from the Multisite installation is to have both versions open in separate tabs in your browser and go through each setting manually. When you have all of the site settings identical, it is time to check that everything has been imported correctly. You may want to check all of the links and media on each post and page to ensure everything works as it should.

If you are confident that the new version of the site has been moved successfully then you should deactivate the Multisite version. You can do that by logging into the Sites Admin dashboard of your Multisite installation and selecting the deactivate option for that site.

Using deactivate (rather than delete) gives you a quick and easy option to roll back to this version of the site if any problems occur. After a few days — or weeks if you prefer being extra careful — you can delete the site from your Multisite installation.

Conclusion

As you can see, the process of splitting off a site onto its own installation from Multisite isnā€™t too difficult. This simple method can be used to completely break apart your Multisite installation by repeating the instructions for each individual site.

If you have to split a Multisite installation of WordPress down to individual sites, let us know about your experiences in the comments below.

Photo Credit: Pasukaru

Tom Ewer

Tom Ewer is the founder of WordCandy.co. He has been a huge fan of WordPress since he first laid eyes on it, and has been writing educational and informative content for WordPress users since 2011. When he's not working, you're likely to find him outdoors somewhere ā€“ as far away from a screen as possible!

15 Comments

  1. Paul

    I couldn’t get this to work either. Got 116 instances of failed to import. 19 of them were failed to import product, 11 of them were email and plugin related failures and the rest were failed to import order errors. I tried everything listed in this tutorial but nothing works for me. Any ideas?

  2. James

    Hi Tom,

    If this were an automation feature of ManageWP, it would sure speed up the process for me a lot instead of the manual process I go through right now.

    Cheers

  3. Joseph Dowdy

    What you describe here is pretty straightforward, but you don’t address my biggest challenge which is how to set up a new live site with the same domain name. I have migrated a few sites split off from multisite and have not quite had a consistent method to do this where it doesn’t result in researching how to fix problems that crop up because of the method I am using.

    1. Christopher Eller

      I agree–same problem.

      This article skips right over the fact that the domain the sub site uses is already in use as an add-on domain for the subsite.

      Then you must create the new site (with a domain so that you can log into it).

      Finally, you must import to the new site, choosing the option to bring over all the images from the existing site on the multisite network.

      IMPOSSIBLE! You can’t use the same domain at the same time for two separate sites.

  4. Liam

    This process works, however many other things need to be tweaked. For example:
    – Timeouts are common so tailing the error_log in a shell is very wise as it will tell you what went wrong.
    – PHP timeouts will need to be raised from the defaults
    – If you use php-fpm you’ll probably need to disable it and use mod_php for the import process
    – If you do that you need to change ownership of all files in the WP directory to that of the apache user
    – If you’re changing the domain of the website you’ll also need to do a search and replace on the database
    – Using FTP to download then upload files is clunky – better suggest using rsync or scp to do direct transfers between servers
    – ALL theme and plugin config is lost during the move, as well as menu placement and probably more that I haven’t found yet

    All of the above is true for a 1.5GB website I’ve just applied this tutorial to.
    The others are correct – this is a good guide but it’s far from complete. Keep going šŸ™‚

  5. Al

    There are lots of articles like this that show how to solve the exporting process of a multisite with the export tool from within wordpress. The thing is: If your website is as big as 5GB, most servers will not even do the export job. I always get out empty XML’s because there’s too much data.

    For me, this article unfortunately didn’t help (but the others didn’t either). There needs to be another way of doing that. This, by the way, would make a great plugin….

  6. ian

    Hello Tom

    Unfortunately there are a number of issues connected to migrating sites from multisite into single installs. Most of these are connected to the media library and it’s location relative to the root.

    As I am currently trying to migrate sites in order to use a platform like managewp, I have spent a couple of weeks trying to resolve these issues and have finally succeeded in working out a way to migrate successfully.

    The key to doing this is to move some of the data held in the _posts table and change the urls.

    There are also many other considerations such as plugin settings and theme settings that need to be considered.

    I’d be happy as a client of managwp to help with producing a guide to doing this if it helps.

    For now though, I would perhaps remove or update your article as it will mislead people into thinking this is a straightforward process.

    thanks
    Ian

    1. Joey Brennan

      I agree with Ian. If we have to change URLs in the database, that sounds like something I would want some careful direction on since I’ve hardly ever touched the database.

  7. Chito

    First of all thanks for the article Tom, I have been thinking of merging my multisite into one site and I found this. I gave a try yesterday but I always get “504 Gateway Time-out” when I select the option “Download & import attachment”, probably due to the size of my website though I am using dedicated server. I also tried importing without checking this option, that time import was successful but no media found in the post though I move the media from each blog dir and changed all url. I am bit stuck somewhere…I can probably try what Frank has done but not clear idea where I am heading, any suggestion would be appreciated.

    1. Tom Ewer

      Author

      Hm…not sure Chito. I’d recommend that you ask the question on the WordPress.org forums — someone should be able to help you there šŸ™‚

  8. eliz

    The media did not import for me either. But the good news is it worked for getting me off the multi-site, which I was not particularly happy with at all.

    I was moving to a new server and wanted to get the site out of multi-site and it is a relief that part is done. ManageWP is a much better option.

  9. Chris

    Thank you so much for the rundown on this process. It gave me a lot of confidence to do this on a site that I needed to break out of its own multi-site install.

    I ran into issues when importing media files though – some of them didn’t import correctly (mostly FLV and SWF files). During the import, it gave me errors about eight or so media files not being able to import. The import completed (the refreshing arrow stopped spinning on the browser) but the page didn’t give me a message like “all complete.” So I went into the posts and pages and found that none of the posts or pages were imported. That was a bit confusing. So by tempting fate again, I ran the import again. It ran through the import just like the first time to attribute the posts to their respective users and I made sure to check the box for importing the media and then ran the import again (I did have the import media checkbox checked the first time). This time many comments appeared that said it didn’t import the users because they existed and posts were going to be attributed to existing users. I still saw those same media files not being imported. This time, when I went to look at the posts and pages they were there.

    I visited the site and saw that the content was there – except the theme didn’t look correct because I hadn’t uploaded the themes and plugins yet. After uploading the themes and plugins, like you had suggested, it looked like I had expected and hoped.

    So now came the 2 hour process to go in and add the missing media files and setting all the settings from my plugins, widgets (I had to recreate all the widgets and content), menus, etc. (My menus ended up having 2 sets of entries, I assume because I imported the data twice). Thankfully you said to maintain the live site until all settings and content were copied from the existing site.

    On that note, I would suggest you add a note at the end of the section: “Exporting Your Site From the Multisite Installation” – “Don’t delete your website yet. In our next step, we will be importing some content and settings (like media files, widget content and such) from the existing site, so it will still have to be accessible to more easily grab and copy that information.”

    So your description worked for me but I had some hiccups (when does it happen flawlessly?). But now it’s up and running and it pretty much happened with the expected amount of time for issues and reconfiguring.

    Thanks again.
    Chris.

    1. Tom Ewer

      Author

      Sorry to read about the hiccups Chris — in an ideal world the process would be flawless! I’ll look into those and see if we can make the guide more useful.

  10. frank

    Thank you, for this tutorial. But this process did not work well in my case at all. The export/import process did not include all of the media and some other constraints happened as well.

    I had to go the ‘manual route’ by exporting the sql database tables blog by blog and transfer the media content manually from https://s42013.pcdn.co/blog.dir into /wp-content/uploads again blog by blog. Also I did some major manually editing (e.g. domain-names) in the sql files before manually importing them.

    Have fun,
    Frank

    1. Tom Ewer

      Author

      Hey Frank,

      That sounds like a bit of a headache. I’m going to look into this more and see if I can update the guide. Thanks!

      Tom

Leave a Reply

Your email address will not be published. Required fields are marked *

Over 65,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!

Have questions? Get in touch!

Over 65,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!



Have questions? Get in touch!

Over 65,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!



Have questions? Get in touch!

Over 65,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!



Have questions? Get in touch!