General question as this is something I’ve encountered with a few hosts:
A lot of the staging plugins that hosts seem to integrate work by copying one environment onto the other non-incrementally (or at least some of them do).
I’ve seen all of the following happen. Only for a few moments during the push, but they all strike me as bad and potentially also a security vulnerability:
* WordPress shows up as being in installation mode
* The staging environment shows on production with the staging URL
* Etc
What I would like to happen ideally, in this sequence if possible:
* Put up some “we’re under maintenance” page on the frontend
* Do staging -> production push
* Verify successful push
* Assuming so, take down the maintenance page
I’m wondering if this is something that it might be possible to configure with Cloudflare or … something else.
Any best practices / thoughts?
[ad_2]
In software development, you generally never push data up into a prod environment – only code.
What changes are you making in staging that can’t be done on production using drafts, etc?
Content is just data. You would never push content from staging to production. Only code.
If you absolutely have to sync the database itself back and forth, I’d use a host that does this for you like WP Engine or Pantheon.