Staging / Production Environments Advice?
-
I’d like advice about using this plugin on a website with staging and production environments. How can we keep the statistics separate, and how can we keep the collection of stats going continuously on the production environment, while we work on a copied version of the production site in our staging environment?
Some hosting companies, like WPEngine, allow us to exclude individual tables in the database when copying an environment. Other hosting companies do not; copying the database up and down is an all or nothing operation. In those cases, the new data in the staging environment database over-writes the data in the production environment database when it is copied from staging to production.
In those all or nothing situations, if we copy the production environment down to the staging environment, do some work on the site there for a few days, and then copy back up to the production environment, there will have been no stats about visitors to the production site collected for those several days.
Might there be any possibility, for example, of storing the data in a separate database rather than the main WP database? Perhaps one that is stored outside of the website root directory? Or of somehow merging, rather than overwriting the database information?
Perhaps the statistics data could be “export”-able using the standard WP export tools? Then the statistics data could be “exported” from the production environment, via the standard WP export tools, just before up-copying the staging environment to production, and then “import”ed again after the up-copying?
Any other ideas about dealing with these situations?
- You must be logged in to reply to this topic.