Skip to content

Match 8.2/8.3/8.5 wordpress env to 8.4 - #9

Merged
michaelaguiar merged 1 commit into
mainfrom
align-wordpress-opcache-env
Oct 21, 2026
Merged

michaelaguiar merged 1 commit into
mainfrom
align-wordpress-opcache-env

Conversation

@michaelaguiar

@michaelaguiar michaelaguiar commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Why

2b007b7 ("wordpress env updates", 2026-08-27) changed only php/8.4/frankenphp/Dockerfile.wordpress, so the 8.2, 8.3 and 8.5 wordpress images drifted. Some apps update code without a container restart (bind-mounted /app, plugin or theme installs). With opcache.validate_timestamps=0, those apps serve stale bytecode, or a mix of old and new files, until someone restarts the container.

What

Dockerfile.wordpress for 8.2, 8.3 and 8.5 is now identical to 8.4's apart from FROM:

  • PHP_OPCACHE_VALIDATE_TIMESTAMPS=1, PHP_OPCACHE_REVALIDATE_FREQ=60: code changes are picked up within a minute. Sites that restart on deploy can still pass -e PHP_OPCACHE_VALIDATE_TIMESTAMPS=0.
  • PHP_MAX_EXECUTION_TIME=300, up from the base image's 60, for long WordPress admin requests such as updates and imports.
  • Two cosmetic changes come with 8.4's file: the ENV line continuation for CADDY_MEDIA_PATHS (already valid on one line) and an imagick comment.

wordpress-dev inherits max_execution_time=300. It keeps its own PHP_OPCACHE_REVALIDATE_FREQ=0, so it still revalidates on every request, as before.

Testing

  • Built 8.3-frankenphp-wordpress locally on the published patched base and served a page through FrankenPHP. It reported opcache.validate_timestamps=1, opcache.revalidate_freq=60, max_execution_time=300 and opcache.max_accelerated_files=50000, on PHP 8.3.36.
  • 8.2 and 8.5 have the same file content apart from FROM.

Rollout

Merging rebuilds the full 8.2, 8.3 and 8.5 FrankenPHP set: base, dev, wordpress and wordpress-dev. CI's change detection treats a change to Dockerfile.wordpress as a change to the base Dockerfile too. The base rebuilds are no-ops: they build from cache and produce the same patched PHP. If pecl.php.net returns 500s again, re-run the failed jobs.

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.
@michaelaguiar

Copy link
Copy Markdown
Member Author

Review round 1

A fresh-context reviewer checked the following and found no code defects:

  • Each file is identical to 8.4's apart from FROM; 8.5 keeps -frankenphp-latest.
  • The settings reach PHP: the published 8.2, 8.3 and 8.5 bases were run with these env values, and docker-configure wrote them into app.ini on every boot, where PHP read them back.
  • The CI rollout note is accurate, and the README is unaffected.
# Sev Finding Outcome
1 P3 The PR description said wordpress-dev inherits "these settings", but Dockerfile.wordpress-dev keeps PHP_OPCACHE_REVALIDATE_FREQ=0 Fixed in the description: wordpress-dev inherits only max_execution_time=300. Its behaviour is unchanged and correct.

The reviewer also judged the code-review skill's general notes out of scope: the trade-offs of a 300s limit and timestamp validation are the requested 8.4 behaviour, and the duplicated per-version files predate this PR.

@michaelaguiar
michaelaguiar marked this pull request as ready for review October 21, 2026 16:35
@michaelaguiar
michaelaguiar merged commit f246f74 into main Oct 21, 2026
2 checks passed
@michaelaguiar
michaelaguiar deleted the align-wordpress-opcache-env branch October 21, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant