Whenever we’re working with WordPress environments, it’s common for us to clone the production database to our local development database but not necessarily the other way around.
For example, let’s say that we do work in the local development database that contains new posts, perhaps new WooCommerce orders, or other data that you’d like to share with the production site.
At this point, you have two versions of the database that you’d like to merge without losing changes in either environment.
To manage this, we have a few choices:
- You can note all changes made in the local development site and meticulously perform them on the production site.
- You can copy changed rows from the development site and run the queries on the production site. The problem with this is when the new data comes in; users may have the same IDs used in the local development database ultimately creating a conflict.
- With currently available tools, you can move the development database to the live site. But you’d lose the vital changes like comments or orders that happened on the live site during development.
None of them make for an ideal deployment workflow.