January 1, 2013 at 2:05 pm #8800
I am trying to create a live staging environment for a site I’m working on. The main site is already live but I want to change the them and it get it all 100% before making it live on the main site. I want all the same content, widgets, layout, etc there…but just don’t want it to go live before I finish tweaking it.
Is there an easy way to do this?
Thanks.January 1, 2013 at 6:00 pm #8854
RickRDuncanParticipantPost count: 21
Just this morning I posted a tutorial on creating a WordPress test site on wpsyntax.com. If you notice how the folks here at StudioPress showcase their themes on URLs following the pattern http://demo.studiopress.com/THEME-NAME/, my tutorial covers how to build that same functionality.
-Rick R. Duncan
RVAMedia.comJanuary 3, 2013 at 10:59 am #9194
Thanks for the great post, it’s very helpful.
However, I’m trying to completely duplicate the site that I have now. There is a lot of data, so will this method carry over all the images, widgets, etc? In other words, will it be an exact duplicate of the existing site?
Also how can I be sure google doesn’t index and try to rank the pages on the staging site? That would be a nightmare if all that content got duplicated in google.
Thanks.January 3, 2013 at 11:26 am #9198
Also this post says to disable all current plug ins on the current site. That would totally mess my existing site up if I did that. Is there any way I can duplicate the site without doing that?January 3, 2013 at 2:39 pm #9263
Bill MurrayParticipantPost count: 572
@rick4him – RickRDuncan’s article is basically an article on setting up WP multi-site aka a WP network. I run a managed WP hosting environment, and you might benefit from how we accomplish what you want to do. We have multiple networks, but that only adds a layer of complexity that you may not need or want.
1) Starting with your live site on a WP MS network, create a new staging site; immediately after creation, block search engines from the staging site; the live site should be a subsite on the network, mapped to its TLD
2) Create the staging site as you see fit, using a variety of tools to get the current site content into the staging site (WP Importer, PHPMyAdmin, etc)
3) On a WP MS network with the live site mapped to the TLD, you now have 2 options to make the staging site live:
a) Simple – delete the mapping of the TLD pointing to the current live site and add domain mapping pointing to the current staging site (that makes the staging site the new live site); immediately make the old live site set to block search engines; or
b) Less Simple – Manually make the live site like the staging site by activating the same set of plugins, the same child theme; there are plugins to allow you to export/import widget settings, and if your child theme changes are largely CSS, the manual option can sound like more work than it actually is.
You may ask why anyone would opt for 3(b) since 3(a) is so simple. If you have a live site that is generating a lot of new content (even comments) and the time to go from staging site to live site is long, the content on the staging site will be stale by the time you attempt 3(a). Therefore, that approach only works if it is done quickly or the site has infrequent updates.
In our setup, we sometimes set up the staging site on a separate network (but still a subsite), drop the tables from the live site, then move the tables from the staging site network to the live site network, making sure to match the same DB prefix and site ID (both of which you can do through PHPMyAdmin). Then, as a final step, we make sure the tables we effectively swapped contain the right network reference (we keep the subdomain the same). All of this works much smoother than it may sound. These migrations take a strong attention to detail, but the tools to do them work reliably.
Hope that helps.
January 3, 2013 at 3:40 pm #9291
You must be logged in to reply to this topic.