How do I install PHP extensions from the Wordpress Kubernetes Marketplace app?

So far I’ve been able to set up a Kubernetes cluster with the Wordpress Kubernetes app. It comes with a load balancer, droplet pool, and some volumes. After getting it set up, I was able to switch to the wordpress namespace with kubectl.

kubectl config set-context --current --namespace=wordpress

Then I executed bash on the wordpress pod.

kubectl exec -it wordpress-pod-name -- /bin/bash

So I did some exploring and found that the bitnami installation for wordpress is in /opt/bitnami and /bitnami has wp-content in it for some reason. On bitnami’s documentation, you can use a script called to restart the Apache and PHP services.

Install Different PHP Modules

Strangely enough, this script does’t exist and I can’t find it. I tried restarting Apache and PHP the usual ways and those didn’t work either. I wanted to start by installing either ImageMagick or GD for PHP, but without being able to restart the services I’m stuck.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi, I recommend simply doing one of the following to get your required PHP modules installed

1). automated option

  a) locally create php.ini which has all PHP modules you require
  b) add a line to the Dockerfile to copy the php.ini into the appropriate directory within your running container
  c) kubectl apply -f your_resource_file.yml

2). manual option

  kubectl exec -it wordpress-pod-name -- sudo pecl install extension1 extension2 ... extensionN

In general, you should be able to restart any process. For example, one can restart Apache by doing something like the following depending on your setup:

  kubectl exec -it wordpress-pod-name -- sudo apachectl graceful

Well, I wish that the information assists you and best of luck.

Think different and code well,