.htaccess permissions & Apache restart | Bitnami Wordpress | Kubernetes .htaccess permissions & Apache restart | Bitnami Wordpress | Kubernetes kubernetes kubernetes

.htaccess permissions & Apache restart | Bitnami Wordpress | Kubernetes


Note that Helm charts work in a different way than Bitnami stacks such as the Bitnami WordPress stack, so there are certain things such as restarting a service which are conceptually different if you are using Helm charts or stacks.

Keeping this in mind, I'm going to reply to your questions below:

  1. Allowing wordpress to generate the default config of htaccess. When I go to the permalinks settings, it asking me to add a piece of mod_rewrite code to htaccess as it has no write permission.
  2. I am trying to use certain plugins such as wp-rocket, all in wordpress security and firewall, but all these need to have access to htaccess to write certain rules.

Unfortunately the .htaccess file is not persisted between pods. However, you can workaround this by creating a .htaccess ConfigMap like described below:

https://github.com/helm/charts/tree/master/stable/wordpress#disabling-htaccess

Once done, you can customize the file /path/to/wordpress-htaccess.conf and add all necessary directives on your side.

But keep in mind this means WordPress won't be able to add them automatically on its side, you will need to add them on yours.

  1. I am trying to also find the script to restarts, status of apache in this structure /opt/bitnami/ctlscript.sh restart but the sh script is no where to be found.

Bitnami Helm installs do not use ctlscript.sh for managing services. Instead, the recommended way to restart WordPress in Kubernetes (or any Kubernetes service) is by deleting the pod.

Then, because it is launched inside a deployment, the pod will be recreated with the persisted configuration (same uploads, themes, database configuration, etc.).