Need help to increase the performance of wordpress in kubernetes

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information: i have deployed EKS for this with two node group running on t2.medium instance type

Kubernetes version: client 1.21 - server 1.19
Cloud being used: (put bare-metal if not on a public cloud) : AWS
Installation method: kubectl
Host OS: Windows

Question : currently i am working on a project where i need to deploy wordpress sites on cluster which i have done it but the problem rises when i try to access them. it takes too much time to load. so, i need help to make wordpress perform faster and efficient.

any suggestions will be welcome.

1 Like

You need to figure out where your bottleneck is. Wordpress isn’t a very optimized application and in the past decade, I’ve seen thousands of people just load it up with plugins and not realize that dynamic pages are computationally expensive. Wordpress provides very generalized guidance in their support documentation.

Below are some brief starting points to help you out.

Metrics Server

If you haven’t installed the metrics server in your cluster, you should do so.

With this running, you can identify node and pod resources with these commands and find out if your CPU or memory is bottlenecked.

kubectl top nodes
kubectl top pods
kubectl top nodes -n some_namespace

Application Caching

Most Wordpress websites are really just static and you don’t need to be continuously building a page that’s going to be the same for the majority of it’s existence.

Caching is pretty broad and there are tons of options here.

Applications like varnish proxy to the web endpoint and provide static page caching outside of applications.

A lack of caching with Wordpress is such a problem that there are plugins built to help cache the pages like WP Super Cache and W3 Total Cache.

PHP Optimizations

It’s been a while since I’ve fiddled with PHP optimizations, but things like opcache and apc used to be very helpful in making php snappier.


You can use slow query logging to identify poorly built queries and such.

This is a really useful script that can actually help identify some common MySQL issues. The guy that wrote it worked in web hosting for years and packed common issues he saw into that script. I’ve not used it in about half a decade, it was made before containerization happened, so mileage may vary.

1 Like

hey @protosam , thanks for quick reply. i will deploy metrics server and will surely provide any kind of caching mechanism to wordpress.