From 4c8cbf94795c23de38991a8bdb43d7ee9c77af50 Mon Sep 17 00:00:00 2001 From: Michael Aguiar Date: Wed, 21 Oct 2026 09:32:08 -0700 Subject: [PATCH] Match 8.2/8.3/8.5 wordpress env to 8.4 2b007b7 ("wordpress env updates") only touched 8.4's Dockerfile.wordpress, so the other versions kept validate_timestamps=0 and the base 60s max_execution_time. Bring them in line: - PHP_OPCACHE_VALIDATE_TIMESTAMPS=1, PHP_OPCACHE_REVALIDATE_FREQ=60, so sites that update code in place (bind-mounted /app, plugin/theme installs) pick it up within a minute instead of serving stale or mixed bytecode until a restart. Sites that restart on deploy can still set it back to 0. - PHP_MAX_EXECUTION_TIME=300 for long WordPress admin requests (updates, imports). The files are now identical to 8.4's apart from FROM. --- php/8.2/frankenphp/Dockerfile.wordpress | 12 ++++++++---- php/8.3/frankenphp/Dockerfile.wordpress | 12 ++++++++---- php/8.5/frankenphp/Dockerfile.wordpress | 12 ++++++++---- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/php/8.2/frankenphp/Dockerfile.wordpress b/php/8.2/frankenphp/Dockerfile.wordpress index f75a0ea..aeecaab 100644 --- a/php/8.2/frankenphp/Dockerfile.wordpress +++ b/php/8.2/frankenphp/Dockerfile.wordpress @@ -31,7 +31,7 @@ RUN if id appuser >/dev/null 2>&1; then \ # Tier 2: backend clients and library bindings the base deliberately omits. # mysqli - WordPress still requires it; pdo_mysql alone is not enough # gd/exif - media handling -# imagick - Smush / image processing. Pulls ~24 delegate libraries and has +# imagick - Image processing. Pulls ~24 delegate libraries and has # the largest CVE history of anything here; that is precisely why # it is not in the base image. # redis - object cache backend @@ -81,20 +81,24 @@ ENV PHP_DISABLE_FUNCTIONS="exec,passthru,shell_exec,system,pcntl_exec,dl" # a new URL: cache those for a year. Media library files keep their filename if # replaced in place, so they get 30 days. Both are per-site overridable; "*" # matches one path segment (multisite uploads/sites/N/). -ENV CADDY_IMMUTABLE_ASSET_PATHS="/wp/wp-includes/ /wp/wp-admin/ /app/plugins/ /app/themes/ /app/mu-plugins/ /app/cache/ /app/uploads/fusion-styles/ /app/uploads/fusion-scripts/ /app/uploads/sites/*/fusion-styles/ /app/uploads/sites/*/fusion-scripts/ /wp-includes/ /wp-admin/ /wp-content/plugins/ /wp-content/themes/ /wp-content/mu-plugins/ /wp-content/cache/ /wp-content/uploads/fusion-styles/ /wp-content/uploads/fusion-scripts/ /wp-content/uploads/sites/*/fusion-styles/ /wp-content/uploads/sites/*/fusion-scripts/" CADDY_MEDIA_PATHS="/app/uploads/ /wp-content/uploads/" +ENV CADDY_IMMUTABLE_ASSET_PATHS="/wp/wp-includes/ /wp/wp-admin/ /app/plugins/ /app/themes/ /app/mu-plugins/ /app/cache/ /app/uploads/fusion-styles/ /app/uploads/fusion-scripts/ /app/uploads/sites/*/fusion-styles/ /app/uploads/sites/*/fusion-scripts/ /wp-includes/ /wp-admin/ /wp-content/plugins/ /wp-content/themes/ /wp-content/mu-plugins/ /wp-content/cache/ /wp-content/uploads/fusion-styles/ /wp-content/uploads/fusion-scripts/ /wp-content/uploads/sites/*/fusion-styles/ /wp-content/uploads/sites/*/fusion-scripts/" \ + CADDY_MEDIA_PATHS="/app/uploads/ /wp-content/uploads/" # WordPress sizing. WP_MEMORY_LIMIT is meaningless above the PHP limit, so this # must be >= whatever the site sets in wp-config/application.php. ENV PHP_MEMORY_LIMIT=512M \ PHP_UPLOAD_MAX_FILESIZE=128M \ PHP_POST_MAX_SIZE=128M \ - PHP_MAX_INPUT_VARS=5000 + PHP_MAX_INPUT_VARS=5000 \ + PHP_MAX_EXECUTION_TIME=300 # A WordPress install with a page builder and a large plugin set runs well past # the 10k default; overflowing max_accelerated_files silently disables opcache # for whatever does not fit. ENV PHP_OPCACHE_MEMORY=256 \ PHP_OPCACHE_INTERNED_STRINGS=32 \ - PHP_OPCACHE_MAX_FILES=50000 + PHP_OPCACHE_MAX_FILES=50000 \ + PHP_OPCACHE_VALIDATE_TIMESTAMPS=1 \ + PHP_OPCACHE_REVALIDATE_FREQ=60 USER appuser diff --git a/php/8.3/frankenphp/Dockerfile.wordpress b/php/8.3/frankenphp/Dockerfile.wordpress index 0d19f3e..e812ed6 100644 --- a/php/8.3/frankenphp/Dockerfile.wordpress +++ b/php/8.3/frankenphp/Dockerfile.wordpress @@ -31,7 +31,7 @@ RUN if id appuser >/dev/null 2>&1; then \ # Tier 2: backend clients and library bindings the base deliberately omits. # mysqli - WordPress still requires it; pdo_mysql alone is not enough # gd/exif - media handling -# imagick - Smush / image processing. Pulls ~24 delegate libraries and has +# imagick - Image processing. Pulls ~24 delegate libraries and has # the largest CVE history of anything here; that is precisely why # it is not in the base image. # redis - object cache backend @@ -81,20 +81,24 @@ ENV PHP_DISABLE_FUNCTIONS="exec,passthru,shell_exec,system,pcntl_exec,dl" # a new URL: cache those for a year. Media library files keep their filename if # replaced in place, so they get 30 days. Both are per-site overridable; "*" # matches one path segment (multisite uploads/sites/N/). -ENV CADDY_IMMUTABLE_ASSET_PATHS="/wp/wp-includes/ /wp/wp-admin/ /app/plugins/ /app/themes/ /app/mu-plugins/ /app/cache/ /app/uploads/fusion-styles/ /app/uploads/fusion-scripts/ /app/uploads/sites/*/fusion-styles/ /app/uploads/sites/*/fusion-scripts/ /wp-includes/ /wp-admin/ /wp-content/plugins/ /wp-content/themes/ /wp-content/mu-plugins/ /wp-content/cache/ /wp-content/uploads/fusion-styles/ /wp-content/uploads/fusion-scripts/ /wp-content/uploads/sites/*/fusion-styles/ /wp-content/uploads/sites/*/fusion-scripts/" CADDY_MEDIA_PATHS="/app/uploads/ /wp-content/uploads/" +ENV CADDY_IMMUTABLE_ASSET_PATHS="/wp/wp-includes/ /wp/wp-admin/ /app/plugins/ /app/themes/ /app/mu-plugins/ /app/cache/ /app/uploads/fusion-styles/ /app/uploads/fusion-scripts/ /app/uploads/sites/*/fusion-styles/ /app/uploads/sites/*/fusion-scripts/ /wp-includes/ /wp-admin/ /wp-content/plugins/ /wp-content/themes/ /wp-content/mu-plugins/ /wp-content/cache/ /wp-content/uploads/fusion-styles/ /wp-content/uploads/fusion-scripts/ /wp-content/uploads/sites/*/fusion-styles/ /wp-content/uploads/sites/*/fusion-scripts/" \ + CADDY_MEDIA_PATHS="/app/uploads/ /wp-content/uploads/" # WordPress sizing. WP_MEMORY_LIMIT is meaningless above the PHP limit, so this # must be >= whatever the site sets in wp-config/application.php. ENV PHP_MEMORY_LIMIT=512M \ PHP_UPLOAD_MAX_FILESIZE=128M \ PHP_POST_MAX_SIZE=128M \ - PHP_MAX_INPUT_VARS=5000 + PHP_MAX_INPUT_VARS=5000 \ + PHP_MAX_EXECUTION_TIME=300 # A WordPress install with a page builder and a large plugin set runs well past # the 10k default; overflowing max_accelerated_files silently disables opcache # for whatever does not fit. ENV PHP_OPCACHE_MEMORY=256 \ PHP_OPCACHE_INTERNED_STRINGS=32 \ - PHP_OPCACHE_MAX_FILES=50000 + PHP_OPCACHE_MAX_FILES=50000 \ + PHP_OPCACHE_VALIDATE_TIMESTAMPS=1 \ + PHP_OPCACHE_REVALIDATE_FREQ=60 USER appuser diff --git a/php/8.5/frankenphp/Dockerfile.wordpress b/php/8.5/frankenphp/Dockerfile.wordpress index 8637212..320cb5a 100644 --- a/php/8.5/frankenphp/Dockerfile.wordpress +++ b/php/8.5/frankenphp/Dockerfile.wordpress @@ -31,7 +31,7 @@ RUN if id appuser >/dev/null 2>&1; then \ # Tier 2: backend clients and library bindings the base deliberately omits. # mysqli - WordPress still requires it; pdo_mysql alone is not enough # gd/exif - media handling -# imagick - Smush / image processing. Pulls ~24 delegate libraries and has +# imagick - Image processing. Pulls ~24 delegate libraries and has # the largest CVE history of anything here; that is precisely why # it is not in the base image. # redis - object cache backend @@ -81,20 +81,24 @@ ENV PHP_DISABLE_FUNCTIONS="exec,passthru,shell_exec,system,pcntl_exec,dl" # a new URL: cache those for a year. Media library files keep their filename if # replaced in place, so they get 30 days. Both are per-site overridable; "*" # matches one path segment (multisite uploads/sites/N/). -ENV CADDY_IMMUTABLE_ASSET_PATHS="/wp/wp-includes/ /wp/wp-admin/ /app/plugins/ /app/themes/ /app/mu-plugins/ /app/cache/ /app/uploads/fusion-styles/ /app/uploads/fusion-scripts/ /app/uploads/sites/*/fusion-styles/ /app/uploads/sites/*/fusion-scripts/ /wp-includes/ /wp-admin/ /wp-content/plugins/ /wp-content/themes/ /wp-content/mu-plugins/ /wp-content/cache/ /wp-content/uploads/fusion-styles/ /wp-content/uploads/fusion-scripts/ /wp-content/uploads/sites/*/fusion-styles/ /wp-content/uploads/sites/*/fusion-scripts/" CADDY_MEDIA_PATHS="/app/uploads/ /wp-content/uploads/" +ENV CADDY_IMMUTABLE_ASSET_PATHS="/wp/wp-includes/ /wp/wp-admin/ /app/plugins/ /app/themes/ /app/mu-plugins/ /app/cache/ /app/uploads/fusion-styles/ /app/uploads/fusion-scripts/ /app/uploads/sites/*/fusion-styles/ /app/uploads/sites/*/fusion-scripts/ /wp-includes/ /wp-admin/ /wp-content/plugins/ /wp-content/themes/ /wp-content/mu-plugins/ /wp-content/cache/ /wp-content/uploads/fusion-styles/ /wp-content/uploads/fusion-scripts/ /wp-content/uploads/sites/*/fusion-styles/ /wp-content/uploads/sites/*/fusion-scripts/" \ + CADDY_MEDIA_PATHS="/app/uploads/ /wp-content/uploads/" # WordPress sizing. WP_MEMORY_LIMIT is meaningless above the PHP limit, so this # must be >= whatever the site sets in wp-config/application.php. ENV PHP_MEMORY_LIMIT=512M \ PHP_UPLOAD_MAX_FILESIZE=128M \ PHP_POST_MAX_SIZE=128M \ - PHP_MAX_INPUT_VARS=5000 + PHP_MAX_INPUT_VARS=5000 \ + PHP_MAX_EXECUTION_TIME=300 # A WordPress install with a page builder and a large plugin set runs well past # the 10k default; overflowing max_accelerated_files silently disables opcache # for whatever does not fit. ENV PHP_OPCACHE_MEMORY=256 \ PHP_OPCACHE_INTERNED_STRINGS=32 \ - PHP_OPCACHE_MAX_FILES=50000 + PHP_OPCACHE_MAX_FILES=50000 \ + PHP_OPCACHE_VALIDATE_TIMESTAMPS=1 \ + PHP_OPCACHE_REVALIDATE_FREQ=60 USER appuser