Thomas Stringer
Thomas Stringer

Reputation: 5862

How to do Wordpress dev/prod development with the database?

I'm trying to reason through the best way to accomplish this. If you have two environments for the same site (a dev and a prod environment each respectively).

If each of these sites has its own database (devdb and proddb), and you're developing new pages etc on the dev site and database.

What is the typical way to transfer the changes in the dev database to the prod database? Is there any native way (or plugin) to handle this in WordPress?

Thank you in advance!

Upvotes: 1

Views: 324

Answers (1)

KodeFor.Me
KodeFor.Me

Reputation: 13511

In case you have CI/CD in your workflow, then you can install wp-cli that offers a set of commands for export a dump of your DB, and also has another set of tools to make string replacement (such as domain changes. ie: replace the dev.domain.ext to www.domain.ext) in the DB. Of course, you are not limited to use the wp-cli only in combination with CI / CD but it can also be used using this way of deployment. More specific: Export, Import, Search & Replace.

Upvotes: 2

Related Questions