2

Different settings for staging


C
Chris

When pushing to staging, often we want exactly the same settings for everything, so it is literally the same environment. But sometimes that's not the case, and we want different settings because the use case is so different. For example, on our main Woocommerce site's staging, I would always switch off caching (unless I was specifically testing caching) because I want to see everything as up to date as possible. Similarly, PHP workers are static on live, but dynamic on staging. This means I can get a lot more utilisation out of a given grade of server because I'm not having to double RAM for staging. And you might want staging to be on the next PHP version up until confident to change the production site.

How to do this?
1. Choosing what to push over at the time of pushing is a bit flawed as a convenience measure because you might just as well change it in the staging site after pushing, and it doesn't help when pushing back to live.
2. Making all the settings persistent in the staging site with one toggle might work better. When pushing to staging, a live site settings file could be generated for later restoration if necessary. And on pushing to live, you'd get the option to (a) retain the live settings, (b) replace with the settings file, or (c) replace with staging settings.

A