GAP School Module 10 — Production Hardening Lesson 10.1

A deploy checklist isn’t a bureaucratic ritual — it’s the artifact of every time something went wrong. Before the Anchor preflight discipline existed, deploys were “push the files, check the homepage, call it done.” This produced a 94-point-font heading that stayed live for 11 hours, a broken contact form that captured zero leads for 6 hours, and an OPCache miss that showed customers 3-day-old pricing for an afternoon.


The situation

None of the early incidents were caused by bad code. They were caused by missed checks: a PHP syntax error that worked in development because of a version difference, a staging URL that slipped into a production file, a CSS version string that wasn’t bumped. The checklist didn’t add complexity — it made the existing complexity visible.


What I did

The 12-point preflight checklist

Run before every deploy to production. Not after. The purpose of a preflight is to catch what you’d miss in the adrenaline of shipping:

Pre-deploy checklist
Pre-deploy preflight — run before rsync/push: [ ] 1. PHP syntax check on all modified files find . -name "*.php" -newer ./last-deploy.txt | xargs -I{} php -l {} [ ] 2. No hardcoded staging URLs in modified files grep -r "staging\." ./ --include="*.php" | grep -v ".git" [ ] 3. No debug output left on (WP_DEBUG_LOG ok, WP_DEBUG_DISPLAY must be false) [ ] 4. wp_remote_post timeout values set (default 5s too short for AI/feed calls) [ ] 5. All new meta keys use the [client]_ prefix (not raw strings) [ ] 6. New cron events: interval name exists in cron_schedules filter [ ] 7. New options: checked for collision with existing option names [ ] 8. New REST endpoints: tested with curl before deploy [ ] 9. Images: no unoptimized originals >500KB added to theme [ ] 10. CSS/JS: version strings bumped if files changed [ ] 11. Backup confirmed: verify last automated backup timestamp [ ] 12. Staging smoke test: change ran on staging for at least 30 min

Post-deploy verification

Different from preflight — this is what you check after files land on production. Run within 5 minutes of deploy completing:

Shell — post-deploy verification
# 1. OPCache flush — always run after PHP file deploy curl -s https://[site]/opcache-flush.php && rm /path/to/opcache-flush.php # 2. Verify homepage loads curl -sI https://[site]/ | grep "HTTP/" # 3. Verify contact form AJAX endpoint responds curl -s -X POST https://[site]/wp-admin/admin-ajax.php \ -d 'action=[client]_contact_lead' | grep -q '"success"' # 4. Verify inventory grid returns units curl -s "https://[site]/inventory/" | grep -c 'class="unit-card"' # 5. Check error log for new entries tail -n 20 /var/log/php/error.log | grep "$(date +%d-%b-%Y)"

Pre-committed rollback threshold

The rollback threshold is agreed before the deploy begins — not evaluated after, under sunk-cost pressure. If 3 of 5 post-deploy checks fail, roll back immediately:

Shell — rollback procedure
# Roll back file changes rsync -avz --delete ./backup-YYYYMMDD/ prod:/path/to/wp-content/ # Flush caches after rollback ssh prod "cd /path/to/wp && wp cache flush"

Why it matters

The preflight checklist’s value is asymmetric. Running it takes 5 minutes. The incidents it prevents take hours to diagnose, fix, and re-deploy. The Anchor checklist grew from 4 items to 12 over 8 months — each addition was a near-miss or a real incident.

The post-deploy verification is different in character from the preflight. The preflight is “is what I’m about to ship correct?” The post-deploy is “did the ship actually land cleanly?” Both are required. Most teams do neither.


The Anchor build

12-point preflight checklist in use for 8 months. 0 post-deploy rollbacks after adopting the full checklist. Prior to the checklist: 3 rollbacks in the first 6 months. Most common preflight catch: version strings not bumped on CSS files (caught 4 times). Most common post-deploy catch: OPCache not flushed (caught 3 times before the automated flush step was added to the sequence).


Do this, not that

  • Write the checklist down, don’t run it from memory. A mental checklist is a checklist with items you skip when you’re in a hurry. A written checklist is one you can hand off.
  • Add items after every near-miss, not just after full incidents. Near-misses are free incidents. Use them.
  • Pre-commit the rollback threshold before starting the deploy. Post-deploy decisions made under sunk-cost pressure are worse decisions. Set the rule when calm, not when panicked.
  • Separate preflight from post-deploy. They check different things. The preflight verifies what you’re about to ship. The post-deploy verifies that the ship landed clean.
When you’re ready to build

The lessons are yours. When you want it built, we’re here.

Every lesson stays free — no account, no paywall, no email gate, ever. But if you’d rather have this system standing on your business than wire all 48 lessons yourself, leave your email. We’ll send you a direct line to a build — and you’ll be first to hear when we add new tools to the curriculum.

None of this gates a single lesson. The curriculum was free before you got here and it stays that way.

We’ll use your email to send you a fast-track to a GAP build and occasional notes on how GAP builds digital sales departments. Lessons stay 100% free — no email required to read any of them. We never share or sell your information. Unsubscribe any time. Privacy policy at gapindustriesllc.com/privacy.html.

Done learning how it’s built? We’ll build it.

You came here to understand the system, and now you do. If you’d rather have it standing on your business than spend the next three months wiring it yourself, GAP Concierge is the same architecture from these lessons — a white-label AI agent that knows your catalog and captures your leads — set up for you, from $97/mo.

See GAP Concierge →