- determine site ID (for example:
5) - create a spot where the new website will live (for example:
/www/mywebsite.nl/public) - install a new WordPress
cd /www/mywebsite.nl/public ; wp core download- copy theme(s) and plugins
cp -a /www/multisite.nl/public/wp-content/{themes,plugins} /www/mywebsite.nl/public/wp-content/- migrate uploads
cp -a /www/multisite.nl/public/wp-content/blogs.dir/5/files/* /www/mywebsite.nl/public/wp-content/uploads/
# 5 is the site-id- export database of multisite to SQL file, use any tool you like for this. You ONLY NEED tables that start with your prefix followed by the site id (for example:
wp_5_) and the users and usermeta tables. - edit the database file and make the following changes
a. search and replace
{your_prefix}{site_id}_with just{your_prefix}, sowp_5_becomeswp_a. remove records from the users table that contain users that are not allowed in the new site. a. check the registered domain name in the options table, listed withsite_url(for example:http://mywebsite.multisite.nl) WARNING do NOT rename the domainname here, that might be a problem. - import the database
- rename the domain
cd /www/mywebsite.nl/public ; wp search-replace http://mywebsite.multisite.nl http://mywebsite.nlThis is serialization-safe.
- rewrite the old file-paths
cd /www/mywebsite.nl/public
wp search-replace blogs.dir/5/files uploads
# again; 5 is the site-id
wp search-replace /files /wp-content/uploads
wp search-replace wp-content/wp-content wp-content note: not all replacements here are needed in all cases, these are the replacements I did during my tests to get it all working
- Now test your site and fix individual problems :)