Steve Hanlon 8ff3a6ec31 Fix step status+notes save (forms were nested in HTML)
The step card's save form wrapped the entire card, including the
autocheck 'Run checks' button and per-step extras like the email
'Send' form — those are also <form> elements. Nested forms are
invalid HTML; browsers silently drop the outer form's submit when
they see an inner one.

So clicking 'Save step' was effectively a no-op: the POST to
wph_save_step never reached the server, and the status reverted to
'not started' on reload. The bug had been there since the autocheck
panel was introduced in v0.3 of the healthcheck.

Restructured the step card as a <div> wrapper containing three
siblings: (1) static content (title, blurb, sub-items, watch-outs,
escalation), (2) the autocheck panel + step render_extra (each with
their own forms), (3) the save form. No nesting anywhere.

Verified end-to-end on testsite: step status and notes now persist
across page loads. The email step (which has 3 sibling forms — refresh
checks, send test, save) also renders without nesting.
2026-06-12 10:29:33 +01:00

Site Healthcheck

Internal WordPress plugin that walks a technician through a structured healthcheck. Companion to wp-site-recovery, which it expects to be installed as step 0.

Install

ln -s ~/dev/wp-healthcheck /path/to/wp/wp-content/plugins/site-healthcheck

Then activate from Plugins. Settings appear under Tools → Site Healthcheck.

Use

  1. Open Tools → Site Healthcheck.
  2. Confirm the recovery plugin status panel shows ✓ active.
  3. Click Start new healthcheck.
  4. Work through each step card. For each: choose a status (done / skipped / blocked / n/a) and add notes.
  5. Click Finish & generate report.
  6. Download the Markdown report or copy it to clipboard.

One in-progress session per site at a time. Reports are not stored in the database (the plugin is meant to be uninstalled at the end of each engagement) — download them.

Adding, removing, reordering steps

Each step is a single file under includes/steps/ named <order>-<slug>.php.

<?php
// includes/steps/45-staging.php
return new class extends WPH_Step {
    public function id(): string { return 'staging'; }
    public function title(): string { return 'Step 4.5 — Verify Staging Sync'; }
    public function sub_items(): array {
        return ['Re-deploy from production', 'Run smoke tests'];
    }
};
  • Add: drop a new file.
  • Remove: delete the file.
  • Reorder: rename the numeric prefix (steps are loaded in natsort order).
  • Conditionally drop on one install: use the wph_steps filter to unset the step by id.

Stable string IDs (returned by id()) are what's stored in session data, so renaming a file does not break in-progress sessions as long as the id stays the same.

Phase roadmap

Phase 1 (this) is a checklist + Markdown report. Phase 3 will add per-step automation — backup detection, env auto-collect, plugin update intelligence, PageSpeed Insights, SSL checks, etc. See beads epic hc-5ix for the full plan.

Distribution

Internal/agency tool — not a WP.org plugin (decision hc-5ix.26). Distributed as a built ZIP. A self-hosted update channel is hc-5ix.27 on the phase-3 backlog.

Tracking

cd ~/dev/wp-healthcheck
bd list --label phase-1   # MVP work
bd list --label phase-3   # automation backlog
Description
No description provided
Readme 985 KiB
Languages
PHP 98.6%
Shell 1.4%