Introducing the WordPress multisite.
The Multisite technique allows you to run several WordPress sites together within a single installation.
This technique allows you to share the WordPress core, themes and extensions.
This results in significant time savings when maintaining your sites since you only update once.
Read more about this:
Extracting a site from a multisite step by step.
First of all, this tutorial is not meant to be THE method but a method that works and that I put into action today as part of my job as a WordPress developer.
Step -1 – Backup
Saaaaauuuuuvvvvvveeeeegggggaaaaaarrrrrrdddddeeeeee
Backup your files (WP, extensions, themes, mu-plugins and Mysql database)
Step 0 – Local installation
Having the multisite locally, it will be much easier to manage and in case of accident, it will generate only you!
Step 1 – Updates
The first step will be to update your multisite:
- WordPress
- Themes
- Extensions
- Languages
If this step is not fundamental, I think that:
- it can’t hurt
- it can avoid conflicts and worries later on when you import themes and extensions into your “Classic” WordPress site.
Step 2 – Installing WordPress
Install a brand new WordPress… For this I suggest you do it in 3 minutes thanks to the wp-cli script I created for you…
OK I admit, I created it for myself… and I thought you might be interested!
Step 3 – Transferring the files
So now, let’s start a file transfer. That’s why I asked you in step 0 to work locally. It will be much easier to move files in the explorer of your machine than remotely via sFTP or whatever.
Remember to transfer:
- Themes (parent and children)
- Extensions
- Mu-plugins
- the “uploads” folder… but I reserve him the step 4!
Of course, on the multisite maybe not all the extensions or all the themes were useful for the site you are extracting.
Upload only what you need and do not activate anything
Step 4 – the “Uploads” folder
The Uploads folder located in `wp-content` contains all the media uploaded to your site and available in the media library.
Admit that it would be a shame not to find them in your new installation.
The Upload folder is a little different to transfer since its folder and subfolder architecture is different from a classic installation.

Notice the difference with a classical architecture. In “uploads”, we have a “sites” folder that does not exist in a regular WordPress installation.
Inside this “sites” folder we have a folder named by the id of the site in the multisite infrastructure.
Then we find the classic WordPress media classification with a year folder and a month folder.
Find the site ID to extract from the multisite
I believe that if you do this manipulation then you have the privileges of super-administrator.
This step is quite simple, you have to go to the network administration of your multisite then in the submenu “Sites” at the end of the line concerning the site to migrate you will find the ID of this one.

The ID recovered you can move all the contents of the folder with the id as name in wp-content/uploads to find the classic tree structure of a WP.
Step 5 – export then import the database
It’s all very well but for the moment, you have everything except your content…. and in a site, it’s the most important thing, the database.
For this tutorial, I will assume that you have the default prefix “wp_”.
Just like media, WordPress multisite adds the id of the site on some tables.
You will have to export all the tables with the ID as well as the wp_user and wp_usermeta tables which do not have an id because in a multisite, the users are common to all the sites.
Personally I do it with PHPmyAdmin if the tables are not too big… we select the desired tables (example: the one of the site “4” wp_4_ as well as the 2 users tables).
Before importing, delete the tables wp_user and `wp_usermeta` from the classic installation to avoid conflicts with the tables you are going to import.
For the import in the classic WP, also use the tool you are used to.
You will end up with duplicate tables: those of your classic installation and the one you just imported that have the prefix `wp_4_`. Delete the duplicate tables from the classic installation.
Import your “multi-site” tables
At this stage, if you look at your database in PHPmyadmin or other, you should notice some tables in wp_ and others in wp_4_
In PhpMyadmin, check all the tables in `wp_4_` then at the bottom of the page in the dropdown menu select “Replace table prefix”
If you decide to change the table prefix, don’t forget to correct the `wp-config.php` accordingly.

We’re almost there!
Step 6 – Replace the media URLs in the Database.
For this I use the SRDB script from Interconnectit. You can find a guide to this script from my friend Grégoire Noyelle.
Here we are going to modify the urls to the medias and thus make a search and replace which would look like this:
Search: https://example.com/wp-content/uploads/site/4/2019/02/mon-image.jpg
Replace: https://example.com/wp-content/uploads/2019/02/mon-image.jpg
Step 7 – the user base
When importing the database, we imported all the users of the multisite… but some of them have no relation with the site you just extracted.
Unfortunately, I haven’t yet found an sql query that fits … if you have an idea, submit it to me in comments, I’ll be happy to improve this tutorial.
Step 8 – Checks
Normally, your classic site is an exact copy of your site when it was in the multisite.
Depending on your setup, there may be 2/3 things to adjust. For example, replace urls to images written in hardcopy in css files created by Elementor page builder…
You may have transferred extensions that are only useful for a multisite…
Step 10 – Rest!
Yeah, there’s no step 9 because it’s good to stop on a round number! a dozen or so!
Normally you have just extracted a site from a multisite to a classic WordPress site… you have earned a little foam, a coffee or anything else that will make you happy!
And if not, there’s the easy way! (added on April 20, 2019)
If like me you are adept of WP-CLI then this script will allow you to extract a site from the multisite in a few seconds…
