How to Migrate WordPress Sites from WPEngine to a Kubernetes Cluster

0
6
Asked By TechSavvyTraveler On

Hey everyone! I recently transitioned my WordPress sites from WPEngine to my Kubernetes cluster. The move went pretty smoothly, but I ran into a problem with the default Helm charts that are made for starting fresh WordPress setups through the admin interface. To address this, I created a custom Helm chart tailored for migrating from WPEngine or similar managed services.

In my setup, the theme is the only part stored in GitHub (assuming you're using GitHub for version control with a CI/CD system), and it's built into the Docker image. Other elements like languages, logs, plugins, and uploads are set up as persistent volumes, and updates to these can be done through the admin interface.

The process is straightforward: just build the provided Dockerfile, transfer the data to the right volumes, import your MySQL data, and then install the Helm chart.

I've open-sourced my solution in case it can help anyone out!

By the way, I moved for cost efficiency, but the flexibility that comes with using Kubernetes (if you already have a cluster) is a huge bonus! You can still add security scanning using plugins like WPScan, so you wouldn't rely on WPEngine anymore.

3 Answers

Answered By DevGuru42 On

Sounds great! Just a quick question: how are you handling the themes folder? Wouldn't it make sense to have a PersistentVolumeClaim (PVC) for that? And about your logs, don’t you think 500Gi is a bit over the top?

CodeCrafter88 -

Good point! I actually manage theme updates in my setup through my GitHub repository with CI/CD, which builds the Docker image every time there’s a change. As for the logs, while you can adjust the storage sizes, I've read about issues where logs can fill up and crash nodes, so I prefer to err on the side of caution.

Answered By KubeGenius On

Interesting approach! But based on your Dockerfile, it seems like your WordPress instance isn’t set up for replication. If I wanted to deploy multiple instances with the Helm chart, my login session wouldn’t work across them. Why is the replica count even an option in the chart?

DevGuru42 -

If you're using a ReadWriteMany (RWX) volume, all instances can connect to the same MySQL, so logins should persist. That’s how I understand it.

Answered By BusinessSavvy On

Nah, I'm good! I moved all our WordPress stuff to WPEngine because I prefer not thinking about backend stuff. It’s been working perfectly for us.

TechSavvyTraveler -

Hey, that's totally valid! Just sharing options for those looking to cut costs and avoid being vendor locked. WPEngine definitely has its perks!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.