If you have ever setup a WordPress Multi-Site aka a WordPress Network, you know that it is not quite the famous 5-minute install that the single site version can be. The few bumps in the road that you encounter are well worth smoothing over as the simplicity of having a single instance of the back-end code to update for multiple domains is worth the effort. I originally setup my WordPress Network when 3.0 consolidated the code-base which simplified or eliminated a number of the more complex parts of the process. Recently I have been changed my primary webhosting environment to a Media Temple (MT) Grid Server (GS) environment. The process has gone far smoother than I expected, but wanted to document a few of the issues I encountered and resolutions to them (as much for myself as anyone else).

Single Site Instructions

The MT: GS single site migration documentation for is quite excellent. My process was only marginally different than what they describe. A brief outline of the process which took 10 – 20 minutes per domain depending on file sizes:

  1. Add a new domain on MT:GS
  2. Create email user with FTP and SSH access for the domain.
  3. Create new database and user / pass with permissions access to it.
  4. Login to your phpmyadmin to take an export of your entire database.
    Optional: Use a WordPress database backup plugin if you find it easier.
  5. SSH login to your existing webhosting domain root folder (httpdocs? html? wwwroot?)
  6. tar -zcf yourentiresitebackup.tar.gz *to create a single archive of your entire site.
  7. SSH login to your MT:GS server and the appropriate domain /html/ folder.
  8. wget http://[insertyourdomainname.com]/yourentiresitebackup.tar.gz to copy the archive folder.
    For large sites or for those who are not on truly high-speed connections, doing this server-to-server copy of a single file is MUCH faster than the alternative download to local PC / upload to new server alternative.
  9. tar -zxf yourentiresitebackup.tar.gz to uncompress the archive.
    Don’t forget to delete the archive once you’ve confirmed the site is operational.
  10. Go into the MT:GS database admin page and import your mySQL archive from step 3.
  11. Setup your new local FTP connection in your development IDE of choice.
  12. Your database connection strings will have changed. Modify the wp-config.php files on the new server.
    The tutorial linked above outlines this information very well. The change of localhost to $ENV{‘DATABASE_SERVER’} was the only unexpected item to me for this.
  13. Replacing 000000 with your account details, you can now preview the domain either at http:/s00000.gridserver.com if it is the primary domain on your MT:GS site or http://sub.alt-example.com.s00000.gridserver.com if it is an additional domain.
  14. Update the DNS entries and wait for the magic to happen.

Their tutorial did cover updating site paths & previews within the SQL database before updating the DNS, but once you’ve ensured your landing page is accessible, the rest of the site will show properly when the DNS have propogated so I found it as a step worth skipping. You may have to re-generate your .htaccess file via the WordPress admin console once that has been done. If you’re DNS are taking longer than you care to wait you can temporarily map DNS/IP addresses to the new server.

Another quirk I discovered is regarding the mail server configuration. Despite the fact that, “When a domain is added to a (gs)Grid-Service, the mail service is automatically created” it is not enabled by default. You have to enable it via the account center in Media Temple.

MultiSite Migration

Wash, rise, repeat? Almost. In the case where I was migrating existing domains as a part of a MultiSite installation things were essentially the same for steps 1 to 13 as above for the primary domain.  In the case of the sub-sites there is no need for database or file transfer since the primary one stores everything. One merely had to create a symlink between your subsite and primary network site via ssh on your MT:GS environment. This was actually a lot easier to resolve than my previous hosting environment which had a mix of cPanel + Plesk and required an intricate series of steps.

To bring other domains over to the new WordPress Network on MT:GS environment this migration guide was a useful place to start. A couple of other pieces of info I discovered along the way that may prove helpful to others:

  • The WordPress Import screen for WXR data will not be available on sub-sites until you enable it on the primary domain of your Network.
  • With the Super Admin / Network Admin changeover, as of 3.2.1 you may find the excellent domain mapping plugin menu has changed locations.
  • When dealing with a site that was already domain mapped in the new installation (but had not yet had the DNS updates) I was struggling to find a way to preview the site similar to step #13 above for a single site. The subsite URL would re-point to the full domain, and the subsite.s000000.gridserver.com would be treated as if it were a new registration request. The easiest solution is actually to NOT have a domain mapping in the primary site until you are ready for the switch, that way subdomain.primarydomain.com will display everything as you need to test plugins, theme, etc.
  • The WXR import / export will bring all your posts, pages and related content and then offer you the option to bring across all attachments which could be a lengthy conversion depending on size of your files – which are essentially moving from /wp-content/uploads/ on your single-site to /wp-content/blogs.dir/##/ on the new server where ## represents the ID of your subsite.
  • Don’t forget to confirm whether the plugins / theme features from your single install work on the multi-site environment.

Good luck! If you find any other tips / tricks that can help others on this path, feel free to post a comment to share.



Similar Posts