How to create a copy of a WordPress Multisite for development purposes
-
Hello
I am not finding a guide on how to achieve this.
Let me explain exactly what i want to do, basically it’s very simple.
It is my intention to work with an exact copy of my wpmu site for development purposes. This way I can have developers,myself including try new things without damaging the life site. I need to create a development environment here and when things are tested and tried on the development site I can then apply it to the live site.
1. I have succesfully setup the wpmu on xyz.com and all works fine.
2. I have setup wildcard domains (*) pointing to xyz.com, as all blogs in the network will have a subdomain structure : example howtocatchfish.xyz.com – i followed the wordpress code on how to create a network.
3. I am using thesis and did all the mods to the theme in order to use it on a wpmu so that’s great.– Now how do i reproduce this environment ?
– having chosen the subdomain structure for my Network of sites can i reproduce this environment on a subdomain called lets say : dev.xyz.com ? or would i have to put my copy onto a test site with a different domain name ?
– In either case how do i set the wildcard domain for the development site to behave exactly like the live site ?This is what i did and what works for a single site but as i found out not for a multisite.
Before i go into details first a fact:
Mysql creates a new set of db files including option tab with siteurl for each new blog you setup inside a wordpress network. Right now I setup three test blogs on the live domain called howtofish.xyz.com etc etc. to test the network. I just wonder how I would do this once I have 1000’s of blogs In the network and I want to test new things out as I explained on top. I cannot go into the database and change manually all siteurls for 1000’s of blogs for my dev copy of the site. So somehow I need a simple solution here.
to reproduce the life environement this is what i have done
1st – i copied all files from xyz.com to another domain i want to use for development purposes which has a different domain name obviously – i would prefer to have a subdomain for my dev version of the site like : dev.xyz.com but i do not know if that would conflict with the wildcard subdomain setup i have chosen for my wpmu.
2nd – i have exported the data of my original mysql database that stores all data of the live site, then i created a new db named that one wrdp1dev and imported the data from the original db.
3rd – updated the wp-config file inside my dev copy to access the data of wrdp1dev database.
4th – have setup * wildcard domains for my dev domain but again ideally i would like to have my dev version on a subdomain dev.xyz.com if that is possible or makes sense.
So
the copy of the database obviously redirects to the live site to override this for a single site one can insert this line of code into the wp_config :
define(‘WP_SITEURL’, ‘http://example.com’);
define(‘WP_HOME’, ‘http://example.com’);WP_SITEURL is the URL location of the WordPress files. WP_HOME is the URL to get to the blog portion of your WordPress site (this will differ from WP_SITEURL if you have a static front page). Omit the trailing slash from the url.
This works for a single site but it does not work for a multisite
And you don’t want to go and update the siteurl’s in he MYsql database option tabs for 100,s or 1000,s of blogs you’ll have in the network.so what would be the line of code to implement for a wordpress multisite using a subdomain structure for its blog network ?
Here is again what i need to achieve
I need to create a development environment with the exact copy of my life Multisite where I can test network wide settings and functions before implementing them onto my life site.
What is the right procedure here ?
I would suggest a Guide written in the Codex as i cannot imagine that i am the only one struggling with this. And there is no resource that explains how.
Any suggestions ?
- The topic ‘How to create a copy of a WordPress Multisite for development purposes’ is closed to new replies.