Something I’ve been working on recently is breaking apart some unnecessary legacy Multisite networks into separate WordPress installations. There are times where Multisite is useful, however I have overused Multisite in the past. The following are some tips when extracting sites from Multisite.
Start with empty folders on your computer
This might seem pretty basic, but trust me a little organization beforehand can go along way in making sure the extraction goes smoothly. Creating folders for plugins, themes and uploads as shown here.
Connect to the Multisite network over FTP and download only the files you need into these three respective folders. For themes check the live site under Appearance -> Themes
/wp-admin/themes.php and download that individual theme. If you’re using a child theme, be sure to grab the corresponding parent theme. For plugins you only need to download the active plugins
/wp-admin/plugins.php?plugin_status=active. Lastly, for uploads you only need to download the subsite specifics upload directory. That will be located either
/wp-content/uploads/sites/(subsite ID)/ or
/wp-contents/blogs.dir/(subsite ID)/files/ for legacy Multisite networks.
Extract the database using Multisite Tools Addon for WP Migrate DB Pro
Extracting a subsite’s database manually is a very painful process. Using WP Migrate DB Pro with Multisite Tools Addon makes it way easier. Start by installing both WP Migrate DB Pro and Multisite Tools Addon on the Multisite network. Both plugins should be network activated. Follow the plugins instructions: https://deliciousbrains.com/wp-migrate-db-pro/doc/multisite-tools-addon/ .
Prep a new installation, upload files and import db
With all of the hard work completed, the rest of the migration is similar to moving a regular WordPress site onto a new hosting service. After everything is loaded and the DNS switched you may notice a few dead links. A few suggestions on things to check:
- Check the
wp_optionstable for the
upload_pathoption. Make sure that value is empty. Sometimes old custom paths are pulled over from the old installation.
- Check Google Chrome console for errors. Sometimes a wp cli search-replace is needed to remove the legacy upload links.
wp search-replace /wp-content/uploads/sites/(subsite id)/ /wp-content/uploads/ --all-tables
wp search-replace /wp-content/blogs.dir/(subsite id)/files/ /wp-content/uploads/ --all-tables