Developing WordPress on Kubernetes

I’m currently researching how to develop a WordPress site on top of Kubernetes.
I would like to be able to develop WordPress sites while the live site is running in production. However this would result in a problem. The development database would not be able to merge with live database. Because in the live database there would be additions to all sorts of database fields made by users. For example orders in Woocommerce, update address data and user information. Is it possible to separate. All these user managed data from the live database? So changes in the backend of the development environment can be merged with the live database without conflicts? With changes, I mean for example changes to pages and content. If there is any documentation about how other organisations are doing this I would find this really interesting.

If I’m on the wrong path, please correct me. Other ideas are also welcome.

1 Answer
1

To develop wordpress pages on Kubernetes, there are two types of tools you might want to use:

1. Dev Tools for Kubernetes Workflow

There are a couple of dev tools for building applications directly on top of Kubernetes:

  • ksync: https://github.com/vapor-ware/ksync (basic code sync)
  • DevSpace: https://github.com/covexo/devspace (real-time code sync)
  • Skaffold: https://github.com/GoogleContainerTools/skaffold (continuous deployment)
  • Draft: https://github.com/Azure/draft (continuous deployment)

2. Tools for Managing Dev/Staging/Prod Environments

I have used several tools to manage, merge and update dev/staging and prod environments in WordPress. Here is a list:

  • DB Migrate Pro: https://deliciousbrains.com/wp-migrate-db-pro/ (basic version free, very reliable and fast)
  • Versionpress: https://versionpress.net/ (free, based on git, allows branching and undo, but is horrible to use with plugins)
  • WP Staging: https://wordpress.org/plugins/wp-staging/ (creates a staging site in a sub-directory, might not be optimal for container-based WP dev)

Leave a Comment