Easy way to create staging environment?

Community Forums Forums Design Tips and Tricks Easy way to create staging environment?

This topic is: not resolved

This topic contains 5 replies, has 4 voices, and was last updated by  jordydme 1 year, 9 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #8800

    rick4him
    Participant
    Post count: 128

    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.

    #8854

    RickRDuncan
    Participant
    Post count: 21

    Hey Rick,

    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.

    http://www.wpsyntax.com/wp-tutorials/how-to-build-wordpress-test-site

    Good luck!

    -rd


    -Rick R. Duncan
    RVAMedia.com

    #9194

    rick4him
    Participant
    Post count: 128

    Rick,

     

    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.

    #9198

    rick4him
    Participant
    Post count: 128

    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?

    #9263

    Bill Murray
    Participant
    Post count: 575

    @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.


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #9291

    jordydme
    Participant
    Post count: 28

    I use backup buddy to make a backup of the entire site. I then install that in a directory on my site or a create a subdomain for clients. Easy peasy!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.