-
Step 1 of 6Local
Production on every laptop
docker compose brings up nginx, PHP 8.2-FPM and MySQL 8, and imports a database copy on first boot. Bugs reproduce locally instead of being debugged on the live site.
-
Step 2 of 6Deploy
Git is the deploy
The live web root is the git working tree, so a deploy is a fast-forward pull and a rollback is a checkout. Features ship on branches merged into main, and secrets stay in files git ignores.
-
Step 3 of 6Safety
Lint before you swap
On the mock test site one half-written must-use plugin takes everything down, so every file is linted with php -l before it replaces the live one. Tests use fake sitting IDs, never real students' results.
-
Step 4 of 6Security
Close the open doors
XML-RPC is off after a wave of 600+ spam posts, user listing is hidden from the public API, and the vendor's review endpoints, which had no permission checks, get capability checks and CSRF nonces.
-
Step 5 of 6Edge
Cache what's safe
Cloudflare sits in front of the servers, and the PWA caches versioned assets on the device. A version bump on each deploy makes sure nobody keeps running yesterday's code.
-
Step 6 of 6Result
99.9% uptime for 1,000+ users
I maintained 99.9% uptime for 1,000+ users and resolved 95% of critical incidents within an hour, while refactoring 15,000+ lines of legacy PHP across 3 platforms that stayed in production.
Tip: the ← and → keys work too.