Domain naming convention on a multisite when moving from development to production

by Denoteone   Last Updated November 11, 2017 04:08 AM

I am experiencing issues when I migrate my Development WordPress Multisite to production. Below I have outlined my current process to update my site URL's:

**DEVELOPMENT:**
mainsitedev.com
site2.mainsitedev.com
site3.mainsitedev.com

**PRODUCTION:**
mainsite.com
secondsite.com
thirdsite.com

When I do the move from dev to production I export all of dev's database and copy all of the wordpress files into the production web root.

  1. Import dev_database into productions database.
  2. I have a tool that "Find and Replaces + Serialize" data. I replace "mainsitedev.com" with "mainsite.com".
  3. I update wp_config with the new URL in the "Define site_url" Update the database connection info.
  4. Log into production Admin->Network->Sites. I update the domain URL's for the other sites to their top level domain names: site2.mainsitedev.com BECOMES secondsite.com
  5. I don't do anything with domain mapping but I do check the following checkboxes

Results for the most part my production site works as it should BUT my users DO NOT remain logged in when they navigate sites (this is sporadic at best). Also if I log out of one site I don't allows log out of others. We use Login-With-Ajax and it when the user logs in their profile info should show where the login for was.

MY QUESTION: Does the following make more sense? Keep the subsites as sub-domains but use domain mapping? And only do one Find & Replace to get the main domain. Are my users not staying logged in because of a cookie creation issue?

EXAMPLE:

DEVELOPMENT:
mainsitedev.com
site2.mainsitedev.com
site3.mainsitedev.com

PRODUCTION:
mainsite.com
site2.mainsite.com
site3.mainsite.com

WITH DOMAIN MAPPING:
mainsite.com
site2.mainsite.com  BECOMES secondsite.com
site3.mainsite.com  BECOMES thirdsite.com

I am looking for the most efficient and stable process to migrate from dev to production. Any feedback or recommendations would be very helpful.



Related Questions



Multisite redirect loop for a single www domain

Updated May 14, 2015 04:03 AM