WordPress & WooCommerce: Localhost, Staging and production environments and how to sync them without losing data


I’m working on my first WooCommerce site for an e-commerce shop I’ll be launching hopefully in January (I should say that I’ve been working with WordPress since the very beginning, so I’m not new to WP or PHP development) but I’m struggling with how to setup a good development/production environment.

I’ve been searching for an answer to this but so far the closets I’ve come to an answer was that there is no “good way” to do it and require manually updating.

The problem is of cause that WordPress keeps everything in the same database, from posts (and orders) to settings and meta-data.

Previously I’ve been able to make an duplicate or snapshot of my production site, overwrite my localhost, and then work from there. Confidence that my production site will not receive any new content in the meantime.
But this is not very likely for an ecommerce website.

The files itself is not the issue, this is handled by git but the database is a much more difficult nut to crack.

I’m the developer. We have an designer / CSS wizard too, and we both work on localhost. Then, we have a storage guy and a sells guy and for them to approve and preview changes, we have an online staging environment.
And as the very last thing we, of cause, have the production environment, the actually “store”.

I would appreciate any thoughts, ideas, links or other great advice in how others have solved this or if there is some nice structures / plugins that can help in ensure that this can be done properly.


, , , , Mestika 3 years 2020-05-29T05:11:34-05:00 0 Answers 94 views 0

Leave an answer