How to move a WordPress Multisite out of a Multisite Network
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, the server is no longer able to efficiently host the Multisite network, or you want to use ManageWP Backup, Clone and Restore tools for the site.
Note: 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.
In this article
- What and how to migrate
- What to export
- Create a new WordPress site
- Edit the database
- Upload the files
- Re-save permalinks
What and how to migrate
There are four elements that you should migrate from your Multisite network: the database tables, uploads folder, theme files and plugin files.
After this, you should 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 (if WordPress version is older than 3.5 it will be in folder wp-content/blogs.dir).
In order to 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” part represents the ID. If you are able to see ID=03, then the ID would be “3”.
What to export
You should 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.
In order to do that, 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 (XX represent the website ID, for example wp_12, if the website ID is 12).
The data will be stored in two tables – wp_users and wp_usermeta.
Create a new WordPress site
You should install WordPress on your destination server (or local server, if you’re doing this on localhost). You are able to find instructions for installing WordPress here.
Edit the database
Once WordPress is installed on the destination server, you should edit the database tables. In order to do that, you should 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 should not have prefixes for the site ID, so you should 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, you should copy the files from the old wp-content/uploads/site folder (or wp-content/blogs.dir if WordPress version is older than 3.5). You should copy the folder to wp-content/uploads. Once upload is complete, you should install plugins and themes that were installed on the source site. You could 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.
Re-save permalinks
Clear the browser cache and log into the WordPress admin section of your website. If previous steps are done correctly, your login credentials will be the same as the original site. Now, you should go to the Permalinks section, and re-save your settings.
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 could set them back up, or go back through the process, and implement the backups where you need to.
Once you check that everything is working properly, remove the site from your Multisite Network.