Moving the domain of a Wordpress Multisite Install

In case you’re looking to move a WordPress site with Multisite and not sure where to start, hopefully the notes below will save you a bit of time. If you’re looking to move a regular site, then check out this page here: http://codex.wordpress.org/Changing_The_Site_URL

In a Multisite install, the domain and path get populated more times in the database, so it just requires a few more tweaks to get up and running.

To move your site:

  1. TAKE A FILE & DATABASE BACKUP!
  2. Transfer all web files and the the database to the new server
  3. wp-config.php – Open your config file and update the database connection and the fields:
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'mydomain.com' );
    define( 'PATH_CURRENT_SITE', '/' );
  4. .htaccess – Open your .htaccess file and confirm or update the line: RewriteBase /
  5. Login to your PHPMyAdmin and open the database
  6. Open table ‘wp_options’ and adjust the fields ‘site_url’ and ‘home’
  7. Open table ‘wp_blogs’ and adjust the domain and path for all entries
  8. Open table ‘wp_site’ and adjust the domain and path
  9. Open table ‘wp_sitemeta’ and adjust the field ‘site_url’
  10. WordPress Multisite stores the standard WordPress tables for each blog with the incrementing prefix e.g. wp_1_ , wp_2_, wp_3_ … so you need to open up the ‘wp_*_options’ table for each and adjust the fields ‘site_url’ and ‘home’
  11. TAKE A DATABASE BACKUP!
  12. We then need to run a SQL command to update the GUID for each of the blogs incrementing the table as before:
    UPDATE wp_posts SET guid = REPLACE (guid,
    'http://exampleoldsiteurl.com',
    'http://examplenewsiteurl.com');
  13. Repeat the above and replace ‘guid’ with ‘post_content’.
  14. Run your site

You should now be ready to roll. If you get a connection message, then it is likely some paths are still not correct… if you get a white screen, then you’re best bet is to check your active templates are all in place.

Grow your digital and realise your potential