So I was looking to create a multi site for a clients since the goal is to have the same branded theme on several sub domains to deal with different countries (e.g. mysite.com, usa.mysite.com, canada.mysite.com) where the root site was basically a map to pick our countries site. After reading all about wordpress multi site it seems this would be perfect.
My questions though is how development is different.
Basically how to transfer a multi site from DEV server to client. Will all the subdomains and structure/content transfer just like a regular WP install when I dump databases and transfer
You should be able to move WordPress multi-site the same way you would any other WordPress site. Assuming your development environment is similar to production then yes.
Moving a WPMU isn’t hard but can be tricky. The Codex has pretty good documentation on how to do this.
If you try with the command line and run into trouble with a fast approaching deadline you can always just brute force it as follows:
done
Going brute force is very, very tedious but I have done it several times and it does work. Only advisable for sites with fewer than 20 sites.
At first glance, it may be a simple matter of backing up the database (which holds all the network/sites tables) and injecting it in your production database (using phpmyadmin for instance). You will need to seek and replace in the sql file all references to your local server and replace with domain name (make a backup copy first).
Tables you will need to go through:
wp_posts, wp_ x _posts, wp_site, wp_blogs, wp_options, wp_ x _options (where you will modify the fields home, siteurl, fileupload_url).
You can safely search and replace in the wp_posts and variants tables (replace localhost refs with http://domain.tld/), whereas you will need to manually go through the wp_options and variants. Read the fields carefully, it should be self-explanatory once you get used to looking at them 🙂
If your database / database user / password changes from your local environment to prod, modify the wp-config.php file to reflect these changes. Make sure “localhost” works on your production server.
Then, you would need to upload your WP files to your public HTML directory on the prod server.
Finally, you would need to configure domain mapping (in your cPanel or other server admin panel, setting up wildcard / subdomains) so that your main site and subsites can be accessed by the browser.
Basically, it’s pretty much the same as migrating a single install, with the added need to correctly map your subdomains on the server and replace server references in a couple more places in db.
A wonderful tool that can save you time, frustration, and room for error with all manners of WordPress migrations, and supports multisite to multisite migration, is WP Migrate DB. The Pro version provides you with support and unlimited find and replace.
I am not affiliated with the plugin or its developers, aside from being a customer.