Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ database).
- **The deploy pulls before it builds** (`docker compose pull --ignore-buildable`, then
`build --pull`), so a server fetches a newly pinned tag and same-tag security rebuilds;
the rollback stays unpulled. See PUBLISH_NOTES.md.
- **MySQL 26.7.0** (Innovation) instead of 8.4 LTS. MySQL will not open 8.4 data on 26.7
in place: an existing site's database goes through 9.7 LTS first, or is dumped and
reloaded — see PUBLISH_NOTES.md before deploying.
- CI installs its test tools from `engineering_standards/requirements.txt` (ruff 0.16.10,
pytest 9.1.1) instead of versions typed into the workflow.

Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WordPress Docker Template

Claude context for this repo. It's a clone-and-own template for Dockerised WordPress sites: one OpenLiteSpeed container (WordPress 7.1 + lsphp 8.5, ready for LiteSpeed Cache), MySQL 8.4 LTS, local dev via Docker Compose, CI + GHCR releases, and an optional SSH deploy to any Docker host. The user-facing guide is `README.md`; the knowledge behind it is in `docs/` (index below); this file holds what must be known before touching anything.
Claude context for this repo. It's a clone-and-own template for Dockerised WordPress sites: one OpenLiteSpeed container (WordPress 7.1 + lsphp 8.5, ready for LiteSpeed Cache), MySQL 26.7 (Innovation; 8.4 data must go through 9.7 first), local dev via Docker Compose, CI + GHCR releases, and an optional SSH deploy to any Docker host. The user-facing guide is `README.md`; the knowledge behind it is in `docs/` (index below); this file holds what must be known before touching anything.

## Using this template

Expand Down
32 changes: 17 additions & 15 deletions PUBLISH_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,26 @@ wizard (which the health check counts as healthy).
**Rollback:** repository variable `DEPLOY_USER=root`, revert the commit and push, and point
the proxy back at `<site>-wordpress`.

### The deploy now pulls images; MySQL is pinned to 8.4.11
**Applies to:** any deployed site that takes this version. Informational for the template
itself, which deploys nowhere.
### The deploy now pulls images; MySQL moves to 26.7.0 (Innovation)
**Applies to:** any deployed site that takes this version, and any local dev stack with an
existing `mysql-data` volume. Informational for the template itself, which deploys nowhere;
a fresh clone starts on an empty volume and is unaffected.
**Why it matters:** until now no deploy pulled, so the server kept whichever `mysql:8.4` it
first downloaded — possibly months old. The first deploy with this change pulls
`mysql:8.4.11` and recreates the database container on it: a MySQL patch upgrade within the
8.4 LTS line, applied to the live data at that restart. It also needs Docker Hub reachable
from the server at deploy time (the rollback does not).
first downloaded. The first deploy with this change pulls `mysql:26.7.0`, and **MySQL refuses
an in-place upgrade from 8.4 straight to 26.7**: the only supported route is 8.4 LTS → 9.7.x
LTS → 26.7 ([upgrade paths](https://dev.mysql.com/doc/refman/26.7/en/upgrade-paths.html)).
Deployed as-is on 8.4 data, the database container does not start and the site is down
until the deploy rolls back. 26.7 is an Innovation release: it is supported only until the
next Innovation release (26.10), so keep taking Dependabot's MySQL bumps. The deploy also
needs Docker Hub reachable from the server (the rollback does not).
**Before deploying:** take a database dump (`docker compose exec mysql mysqldump …`, or the
server's backup routine) and note the running version:
`docker compose exec mysql mysql --version`.
**After:** `docker compose exec mysql mysql --version` reports 8.4.11; check
server's backup routine) and keep it. Then either step the volume through 9.7 first
(set `image: mysql:9.7.2` on the server, `docker compose up -d mysql`, wait for healthy,
check `docker logs <site>-db`), or load the dump into a fresh 26.7 volume after the deploy.
**After:** `docker compose exec mysql mysql --version` reports 26.7.0; check
`docker logs <site>-db` for upgrade errors; load the public URL and confirm 200.
**Rollback:** the deploy's automatic rollback recreates the containers from the previous
commit, whose `mysql:8.4` is still the server's older cached copy — so the database steps
back to that patch release on data 8.4.11 has opened. MySQL supports in-place downgrades
within the 8.4 LTS series; if it will not start anyway, restore the dump into a fresh
volume.
**Rollback:** data that 26.7 (or 9.7) has opened cannot go back to 8.4 in place. Restore the
dump into a fresh volume on `mysql:8.4.11` and revert the commit.

## Deployed

Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
![WordPress 7.1](https://img.shields.io/badge/WordPress-7.1-21759B?logo=wordpress&logoColor=white)
![OpenLiteSpeed](https://img.shields.io/badge/OpenLiteSpeed-1.9-0E7DC2)
![PHP 8.5](https://img.shields.io/badge/PHP-8.5-777BB4?logo=php&logoColor=white)
![MySQL 8.4 LTS](https://img.shields.io/badge/MySQL-8.4_LTS-4479A1?logo=mysql&logoColor=white)
![MySQL 26.7](https://img.shields.io/badge/MySQL-26.7-4479A1?logo=mysql&logoColor=white)
[![GHCR](https://img.shields.io/badge/ghcr.io-container-2496ED?logo=docker&logoColor=white)](https://github.com/jackwjensen/wordpress-docker-template/pkgs/container/wordpress-docker-template)

**Clone it, run one command, and you have a full WordPress + MySQL development
environment in Docker — ready to build a site on.** When you're ready, deploy it
to any Docker host, take it onto your own account, and (if you like) keep pulling
improvements from upstream.

Modern stack — **WordPress 7.1 · OpenLiteSpeed · PHP 8.5 · MySQL 8.4 LTS** —
Modern stack — **WordPress 7.1 · OpenLiteSpeed · PHP 8.5 · MySQL 26.7** —
ready for the LiteSpeed Cache plugin's server-side page cache, with GitHub Actions
CI, a published image on GHCR, and an optional one-push deploy with automatic
rollback.
Expand Down Expand Up @@ -59,7 +59,9 @@ its first run; no password is ever committed.)
official LiteSpeed image with WordPress core from the official WordPress image,
tuned PHP upload limits baked in, and the server-side page cache that the
[LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/) plugin needs.
- **MySQL 8.4 LTS** with a real authenticated health check.
- **MySQL 26.7** (an Innovation release — Dependabot proposes each next one) with a
real authenticated health check. A site already on MySQL 8.4 must go through 9.7
first; see PUBLISH_NOTES.md.
- **CI on every push/PR** — ShellCheck, Hadolint, Compose validation, actionlint,
plus a build + smoke test (see the badge above).
- **Published image** on GHCR, built and released from a version tag (keyless).
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ latest release.
| older tags | ❌ |

The shipped stack tracks current, supported upstream versions (WordPress 7.1,
OpenLiteSpeed 1.9, PHP 8.5, MySQL 8.4 LTS), and Dependabot proposes updates monthly.
OpenLiteSpeed 1.9, PHP 8.5, MySQL 26.7), and Dependabot proposes updates monthly.

## Reporting a vulnerability

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ services:
condition: service_healthy

mysql:
image: mysql:8.4.11
image: mysql:26.7.0
container_name: ${COMPOSE_PROJECT_NAME:-wordpress}-db
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:?set MYSQL_ROOT_PASSWORD in .env - ./dev.sh up generates it}
Expand Down
7 changes: 5 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ nginx + PHP-FPM the same day; this template moved from Apache.
WP-CLI + `config/uploads.ini` (as `mods-available/zz-uploads.ini`, lsphp's ini scan dir).
- WordPress core comes from the official `wordpress:7.1.3-php8.5-fpm` image (multi-stage `core`,
with `wp-config-docker.php` removed). Every image and action is pinned to one exact release
(`mysql:8.4.11`, actions by commit SHA); Dependabot proposes the moves.
(`mysql:26.7.0`, actions by commit SHA); Dependabot proposes the moves.
- `docker/openlitespeed/` = server config (`httpd_config.conf`: `www-data`, `disableWebAdmin 1`,
:8080 + :80 plain HTTP, the cache module), the vhost (`vhconf.conf`: `.htaccess` rewrites),
`entrypoint.sh` (core install/upgrade → `make-wp-config.php` → configuration into the tmpfs →
Expand All @@ -26,7 +26,10 @@ nginx + PHP-FPM the same day; this template moved from Apache.
- `php` on the PATH is lsphp's CLI; WP-CLI runs on it through the `wp` wrapper. The image puts
`/usr/local/bin` first on the `PATH`: the base image lists it last and ships its own
unwrapped `/usr/bin/wp`, which would otherwise shadow the pinned one.
- MySQL 8.4 LTS is the database.
- MySQL 26.7 is the database: an Innovation release, supported only until the next one, so
take Dependabot's MySQL bumps as they come (Jack chose it over 8.4 LTS, 2026-10-22). MySQL
refuses to open 8.4 data on 26.7 in place; such a volume goes through 9.7 LTS first, or is
dumped and reloaded (PUBLISH_NOTES.md).

## Why LiteSpeed, not Apache or nginx

Expand Down
Loading