What's a recommended best practices approach to creating a Staging / Dev site for Multisite?

Our production environment is an Ubuntu 17 Server LAMP stack. Our domain is toursoft.co. Clients sign up and have websites at <site>.toursoft.co. Our sites and all client sites at subdomains are all protected by a Let's encrypt wildcard SSL Certificate.

In light of recent issues, we've tried to clone the infrastructure so we can dig into some dev work. But this hasn't worked out as expected.

First, we tried to locate the dev server at dev.toursoft.co. A mistake as this didn't work because, of course, we would then have client subdomains at <site>.dev.toursoft.co. Altering the server configuration to accommodate means we don't have an identical environment.

Also, Domain Mapping interferes with having a dev server. 1st, it's not possible to clone the mapped sites since of course those mappings point back to the production IP address. Secondly, when we turn mapping off, we encounter the bug that all mapped domains do not revert back to their <site>.toursoft.co domain - instead they all forward to the sales page at toursoft.co

Long story short, we're hitting a lot of tiny road blocks when trying to create a cloned environment for staging and testing.

So, I want to defer to you guys. How do you do it? Obviously you don't do dev work on the live EDUBlogs site. But, that infrastructure more or less is identical to those we setup with the Pro Sites plugin.

How is your staging / dev site setup? What are some best practice approaches to setting up dev environments for more complex environments like Edublogs and those that use the family of WPMUDev plugins as part of its core infrastructure?

  • Nastia

    Hello blue

    Hope you're doing well!

    You can create a staging site on a top level domain name, for example, toursoftdev.co. Of course, this means that you need to purchase another domain name

    Also please have a look at this page, that provides a script to mirror a multisite WordPress installation:
    https://pp19dd.com/2011/01/bash-script-to-mirror-wordpress-mu-installation-into-a-sandbox/

    Also, Domain Mapping interferes with having a dev server. 1st, it's not possible to clone the mapped sites since of course those mappings point back to the production IP address. Secondly, when we turn mapping off, we encounter the bug that all mapped domains do not revert back to their <site>.toursoft.co domain - instead they all forward to the sales page at toursoft.co

    To solve this issue please change the Domain Mapping from the network admin; set Administration mapping to domain entered by the user or to original domain, this way you can access a site with the original link sub.toursoftdev.co

    Do the same changes for the Login mapping. Please see this screenshot:

    Hope this helps!

    Cheers,
    Nastia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.