There are many reasons why you may want to move a WordPress Multisite out of a Multisite Network: the site might be too large, it needs its own IP address, the site owner wants to take full control, or the server is no longer able to efficiently host the Multisite network. Whatever your reasons might be, this article will guide you through the process.
Before You Begin
Use an FTP client to download all files and folders and backup your database using phpMyAdmin. If something goes wrong, your files and folders will be safe and you will be able to recover everything.
What and How to Migrate
There are four elements that you need to migrate from your Multisite network: the database tables, uploads folder, theme files and plugin files.
After this, you need to locate your Website ID. Each site in the network is defined by its own unique ID. This identifies its folder in wp-content/uploads/sites or, if your WordPress version is older than 3.5, it will be in folder wp-content/blogs.dir.
How do you find a network ID? Check the URL when you’re in the wp-admin dashboard of that site:
http://mynetwork.com/wp-admin/network/site-info.php?id=XX
The “XX” is the ID. So, if you had an ID=03, then the ID would be “3”.
What to Export
Export the site’s tables from the network database. In this process, you are only moving a “child website”, so there is no need to move the entire database.
Go to phpMyAdmin, and click the “Export” tab. Find all the tables that are related to your website. They are going to be determined by the ID number, and going to look like this – wp_XX.
The data will be stored in two tables – wp_users and wp_usermeta.
Create a New WordPress Site
If you have not already, install WordPress on your destination server (or local server, if you’re doing this on localhost). You can do this with ManageWP, by following these simple step-by-step instructions. One of the great things about ManageWP is that it is very easy to follow, even for a true beginner.
Edit the Database
Once this is complete, it is time to edit the database tables. Log into phpMyAdmin on the new WordPress site, drop the tables and import the SQL file from your old database. The database tables in your new website may not have prefixes for the site ID, so you’ll need to remove these. Run the following query to replace the instances of wp_XX with your actual site ID:
-- Check siteurl SELECT option_value FROM wp_options WHERE option_name = 'siteurl'
Use the ‘siteurl’ value to replace the ‘URL_move_from’ placeholder for the next query. Use the URL of the new site to replace the ‘URL_move_to’ placeholder:
-- Update URL_move_from and URL_move_to inside single quotes UPDATE wp_options SET option_value = replace (option_value, 'URL_move_from', 'URL_move_to') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'URL_move_from','URL_move_to'); UPDATE wp_posts SET post_content = replace(post_content, 'URL_move_from','URL_move_to');
Upload the Files
Once WordPress is installed and database updated, all that’s left is to copy the files from the old wp-content/uploads/site folder, or if it is an earlier version of WordPress before 3.5, it will be in folder wp-content/blogs.dir. In either case, copy the folder to wp-content/uploads. When this is complete, then identify the plugins and themes used by the old website and re-install them again, or move their files to wp-content/plugins and wp-content/themes.
Almost Done
Don’t get discouraged yet, you are almost done! Clear the browser cache and log into the WordPress admin section of your website. If you did these steps correctly, then your login credentials will be the same as the original site. Now, go to the Permalinks section, and re-save your settings.
Check and Recheck!
Verify that all of your links are working and that the widgets and plugins are operating as intended. If the widgets and plugins are not working as they should, you can set them back up, or go back through the process, and implement the backups where you need to.
Once you are satisfied that everything is working properly, remove the site from your Multisite Network. Time to break out the party hat and celebrate!
I will kill you for making me wear this hat.
Photo credit: Jaguar PS / Shutterstock.com
Claude
Hello,
How to apply this process to move a subsite from a multisite domain to antoher multisite domain please ?
Think the site ID_number should be updated in the SQL from XX to YY, anything else ?
thanks,
petar.atanasovski
It looks like this guide can help in moving your blogs into multisite installation – https://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite, it describes the additional steps needed in the process in more details.