WordPress is one of the most flexible platforms on the market. The Content Management System (CMS) provides the backbone for a number of websites and networks. In fact, WordPress Multisite – a way to network installations – powers WordPress.com. It’s a testament to the power behind the platform. Though, in some cases, you’ll want to migrate your WordPress Multisite installation to a single site. This can prove challenging in some areas.
For starters, you’ll need to take a different approach to working with your Multisite installation, as there are some core differences under the hood. Though, once you have a process down, you’ll be able to transfer your site in a no-fuss and painless way.
In this article, we’re going to show you how to move a WordPress Multisite install to a single site. Before we do this, let’s offer a quick overview of what WordPress Multisite is and does.
A Primer On WordPress Multisite
For the unaware, WordPress Multisite is a way to create a network multiple installations. While each site is individual and separate from the rest, they all use the same core installation files. In some cases, sites will also share themes and plugins.
The core difference here – and we’ll get into this a little more in the next section – is that each site is akin to a virtual copy of the primary installation. This means there won’t be a directory for each site as there is for single WordPress sites. Instead, each site gets a media uploads folder and a separate table in the database.
For a real-world example of what WordPress Multisite is capable of, consider WordPress.com:
This is (of course) a huge network of WordPress websites, and helps give the CMS the distinction of being the most popular platform for publishing websites. Regardless, moving away from a WordPress Multisite network to a single installation is more involved than simple site migration.
Why a Multisite Conversion Is More Complex Than Standard Site Migration
Although both WordPress Mutisite and single sites use the same base files – there’s no fundamental difference between the two – you’ll have to plan if you wish to take your site out of the network.
There are lots of benefits of running a Multisite network, such as efficiency and productivity, but these won’t matter if you need to ‘free’ your site and let it fly the nest. Instead, you’ll want to think about how to move your site, for the following reasons:
- Your site doesn’t store core files in its own directory. Instead, it’s a centralized system, with your site acting as a virtual copy of sorts.
- By extension, themes and plugins also live in a central uploads folder. While sites on the network can use the theme in theory, you can’t up sticks and take those assets with you.
- Most of your site’s data uses a specific database table as storage. This is good in some cases, but if you aren’t able to access the database root, you won’t have much flexibility.
- User accounts work in a different way too. Each account is global, in that given the right permissions, a user could access every site on the network. Because of this, you can’t export a list of users and import them as you would a single site installation.
In another context, all of these points could be benefits of using WordPress Multisite. The good news is that these apparent drawbacks can be straightforward to overcome.
How to Convert a WordPress Multisite to a Single Site
The steps to convert your site from a WordPress Multisite installation differ in places from other migration workflows. Here are the steps we’re going to cover in this one:
It doesn’t seem complex, but there are multiple instances throughout where you’ll need to make important decisions and think about what you’re doing. We’ll cover all of this, starting with the migration itself.
1. Migrate the WordPress Multisite Instance to A Single Install
The first decision you’ll need to make is how you’ll migrate your site away from WordPress Multisite. While you’ll find WordPress plugins to help you, there will still be a portion of the process that needs your input. Because of this, we think a manual approach is the best.
Though, if you have Duplicator Pro or a similar premium migration tool on both sites, this is a straightforward way to convert your site. With this route, you’ll still need to follow the steps for moving users to your single install though.
There are three elements to copy over from WordPress Multisite to your single install:
- The database tables related to your site.
- Your theme and plugin files.
- The uploads folder for your media.
If you created your site before WordPress 3.5, your uploads will be in a different folder (although we’ll explain this in a few minutes).
We recommend carrying out a full and clean backup of your site, because of the involved process. Once you have this in place, head to the WordPress dashboard, to the Network Admin > Sites screen:
This will show you a list of all sites on the network. While you won’t see it on screen, you’ll need to find the ID of your site. This will help you later, when you begin to dig into your database structure.
The fastest way to find the ID is to hover over each site in the list, and look to your status bar at the bottom of your browser window:
You’ll want to note this down for later. The next step is to migrate your site’s assets.
Migrate Themes, Plugins, and Uploads
We’re working within a local environment for this tutorial, and we recommend taking the Multisite instance onto your computer first to make sure it works. While we won’t use it in this article, you might need to use Secure File Transfer Protocol (SFTP) to bring certain files out from your installation.
Regardless, you’ll want to grab the
wp-content/plugins folder from your fresh backup or current site, and upload this to your new site. In most cases, you can drag and drop the folder onto your new site’s installation. Also, do this with your themes too. It’s the same process as plugins, but you’ll want to work with the
For your site’s media, you’ll want to use the ID from earlier to find your website within the Multisite network’s
wp-content/uploads/sites folder. This can be a bit of a maze, because there may be multiple versions of some assets and structures.
In our example, the site we want to work with uses an ID of “3”. As such, the path will be
For older versions of WordPress (pre 3.5), you want to look for the
blogs.dir folder. This will contain a
[id]/files sub-folder, and inside you’ll find the media assets.
As before, copy and paste this uploads folder to your single site. Remember, you don’t use a sites folder, and the files and folders within your Multisite instance should go into the top-level directory (i.e.
From here, your files and folders are in place. Next, we have to port over your database.
Extract Your Site’s Database
Before you begin this next step, make sure that you have a full grounding on how to work with your WordPress database. If it’s a new interface, you’ll find it straightforward once you have a handle on the basics.
Note that you may have a choice of database manager here – in our case, it’s Adminer although phpMyAdmin is also popular. The process will be similar enough for both solutions.
You’ll find that a Multisite database has lots of tables – a set for each site in the network – and they incorporate the ID into the name. In this case, we’re looking for a
wp_3_ prefix. To find these tables, click the Export link in Adminer.
For phpMyAdmin, you can select the tables from the list, and choose Export from the With selected: drop-down menu. On the next screen, choose the Quick option and click Go.
If you’re using Adminer, you’ll come to a selection screen. Here, select all of the relevant tables, choose save as the output, click Export:
In both cases, this will download a file to your computer. The next task is to edit it.
Edit Your Database SQL File
For this step, you’ll want to use your favorite code editor, as this will make the task easier. First, duplicate the SQL file and give it a descriptive name. Often, you can append “copy” to the file. Once you open it, you should look for any link that references your Multisite instance, and change it to your new site’s URL:
You should do the same with any instance of
wp_[id]. Here, you can change the prefix to
wp_. Once you do both of these, save your file and get ready to import it into your new WordPress installation.
Import the Database to Your New Site
The process to import your database is similar to exporting it, with one exception: You’ll need to ‘drop’ the tables from your new site (other than
wp_usermeta). In other words, delete them. To do this, log into your new site’s database, select all of the tables, and find the Drop option. With phpMyAdmin, it will be within the With selected: drop-down menu. For Adminer, it’s at the bottom of the screen:
Next, click the Import link or tab:
From the dialog, choose your amended SQL file, then click to begin the process. You may need to leave this running for a while, but once you get a confirmation, you can move onto migrating your users.
2. Move Your Users From the Multisite to Single Install
The bad news is that the database doesn’t separate the users for each site on the network. Because of this, you’ll often want to migrate users one-by-one. This could be tedious though, which means a plugin option could be better. The Import Export WordPress Users plugin is ideal for the task:
The process is as follows:
- Install the plugin on both your new site and the Multisite instance.
- Access the Users > User Import Export page on the Multisite instance.
- Click the Export Users button to download a CSV file of your users.
- Navigate to your new site, and head to the Users > User Import Export page.
- On the User/Customer Import tab, select your CSV file, and click to begin the upload process.
Once the upload is complete, you can remove both plugins. This is a great solution if you have lots (i.e. a prohibitive amount) of users to migrate over. Before you can call the migration done, there’s one more major step to go.
3. Switch Your Domain Name from WordPress Multisite to a Single Install
Before you wrap up, you’ll want to make sure that your domain name points to the right site. There are a couple of situations to note here:
- You may have used domain mapping for your Multisite instance. In simple terms, while your site uses a subdomain or subdirectory, you could map a Top-Level Domain (TLD) – such as example.com – to it.
- If you used the subdomain and subdirectory URL as your main web address, you have an easier time. This is because the process of mapping a new domain is the same as it is for existing sites.
Regardless, you’ll want to make sure that your new WordPress website points to the right domain. To check this, head to the Settings > General page within your new site’s dashboard, and look at the WordPress Address (URL) and Site Address (URL) fields:
These should be explicit: If correct, both will have the full URL of your site. If not, make the necessary changes, and save them.
4. Finalize the Site Migration
- First, clear your browser cache to make sure you don’t see details from the old site.
- Next, log into your new site and check that everything is working as it should be, such as links.
- Push your local site to your live server if necessary.
- Delete your site from the Multisite network. You can do this through the Network Admin screen, similar to adding a new site.
From here, you’ll have to move users across to your new site, and switch your domain over. Let’s give you the details on how to do this next.
If you want to spend more time running your site rather than carrying out administrative tasks, a WordPress Multisite installation is a great way to set your network up. Though, despite the number of benefits, getting your site out of the network can be a drag.
In this post, we’ve given you the steps you need to carry out a clean migration from WordPress Multisite to a single install. Your process isn’t the same due to the core setup of a WordPress Multisite installation. Even so, with some planning and forethought, you can achieve your goals.
Do you want to move from WordPress Multisite to a single site installation, and if so, what are your reasons? Let us know in the comments section below!
Keep reading the article at WPKube. The article was originally written by Tom Rankin on 2021-11-17 09:21:00.
The article was hand-picked and curated for you by the Editorial Team of WP Archives.