Important note: the wordpress docker image (used in the helmchart) provides very limited php extensions out of the box #1679
|
I was migrating from bitnami to helmforge/wordpress (Chart version: 3.0.12), and one of the wordpress plugins complained about missing pdo_mysql extension in PHP. I checked the wordpress Dockerfile on docker hub, and it turned out that it's not enabled, and many php extensions are not enabled by default to keep the image size small. I'm writing to let you and let other people know should they face the same issue. The solution to add more php extensions with this image would be to create a custom image using the method in the link above, then pull the helmforge/wordpress helmchart and adjust it accordingly (or create a pipeline to automate the process). |
Replies: 1 comment
|
Hi @khalidshaheen, welcome to HelmForge, and thank you for sharing this. You are correct: the official WordPress image intentionally ships with a limited set of PHP extensions. It includes This is an upstream image design decision rather than a HelmForge chart issue. The HelmForge chart uses the official WordPress image by default, but you do not need to fork or modify the chart. You can build an image derived from the official one: FROM wordpress:7.1.3-apache
RUN docker-php-ext-install pdo_mysqlPublish that image to your registry and configure it through the chart values: image:
repository: ghcr.io/example/wordpress
tag: 7.1.3-apache-pdo-mysqlThe chart's plugin installer automates the installation of WordPress.org plugins, but PHP extensions such as This is useful feedback. We will track support for verified custom plugin ZIPs, a reusable image-build pipeline example, and clearer documentation about WordPress plugins versus PHP extensions in a dedicated issue. Thank you for bringing it to the community's attention. |
Hi @khalidshaheen, welcome to HelmForge, and thank you for sharing this.
You are correct: the official WordPress image intentionally ships with a limited set of PHP extensions. It includes
mysqli, which WordPress core uses, but it does not includepdo_mysql. Plugins that explicitly depend on PDO MySQL therefore require a custom image.This is an upstream image design decision rather than a HelmForge chart issue. The HelmForge chart uses the official WordPress image by default, but you do not need to fork or modify the chart. You can build an image derived from the official one:
Publish that image to your registry and config…