wp-recovery
Skill1 starsChanged 6 months agoMITView on GitHub
Recover a WordPress site that is white-screening / 500-ing / fatal after an edit — guardian mu-plugin, safe-mode, disable/restore the culprit — plus safe core/plugin/theme updates and guarded .htaccess edits. Phase = Recover.
In this repository14 other files it gives its agents.
- wp-changesSkill
- wp-connectSkill
- wp-contentSkill
- wp-diagnoseSkill
- wp-edit-designSkill
- wp-edit-pluginSkill
- wp-edit-themeSkill
- wp-execute-phpSkill
- wp-fullSkill
- wp-health-checkSkill
- wp-introspectSkill
- wp-migrateSkill
- wp-pair-setupSkill
- wp-scaffoldSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
NEVER guess the culprit — read rolepod_wp_recovery_status + rolepod_wp_recovery_list_changes (or the wp-changes ledger) to find the exact …
- Very specific: line 21
NEVER run rolepod_wp_maintenance_update(scope: core) without a pre-made backup_id — a fresh backup does NOT capture core files, so a failed …
- Very specific: line 22
If rolepod_wp_maintenance_update left the site behind the maintenance page, delete ABSPATH/.maintenance (the tool deactivates it in a …
- Very specific: line 65
Update: rolepod_wp_maintenance_update(scope: plugin|theme|core, slugs?, backup_id?
- Very specific: line 77
After a maintenance update → wp-health-check to confirm green.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
WP Recovery
Get a broken site back up, then keep it up through risky maintenance. The guardian mu-plugin (shipped with the rolepod-wp companion) loads BEFORE normal plugins, survives a plugin/theme parse error, and records the fatal — so the recovery endpoints stay reachable even when the front end is dead.
Iron Rule
<EXTREMELY-IMPORTANT>
1. On a live fatal, turn on `rolepod_wp_recovery_safe_mode(enabled: true)` FIRST — it fail-closes every mutating write in the companion namespace (execute-php, fs-write/-batch/-copy/-rename, option-set, elementor, skills, dir-ensure, backup-restore/-delete, changes-panic/-toggle, job-create, one-time-login) with a 423, and only lets read + recovery routes + read-only wp-cli through. This stops a second bad write while you diagnose. Clear it when done.
2. NEVER guess the culprit — read `rolepod_wp_recovery_status` + `rolepod_wp_recovery_list_changes` (or the wp-changes ledger) to find the exact file/plugin the last writes touched, then disable THAT.
3. NEVER run `rolepod_wp_maintenance_update(scope: core)` without a pre-made `backup_id` — a fresh backup does NOT capture core files, so a failed core update could not be rolled back. It refuses (MAINTENANCE_CORE_BACKUP_REQUIRED) without one.
4. If `rolepod_wp_maintenance_update` left the site behind the maintenance page, delete `ABSPATH/.maintenance` (the tool deactivates it in a `finally`, but a hard crash mid-update can strand it).
</EXTREMELY-IMPORTANT>When to use
- "The site is white-screening / 500 after I activated a plugin."
- "I edited functions.php and now it's a fatal error."
- "I need to update core/plugins but I'm scared it'll break prod."
- "I need to add rewrite rules to .htaccess safely."
Boundary
Owns:
rolepod_wp_recovery_status— guardian view: is the site fataling, what did it catch.rolepod_wp_recovery_list_changes— recent writes the guardian/ledger recorded (culprit hunt).rolepod_wp_recovery_disable_file/rolepod_wp_recovery_disable_plugin— neutralize the culprit.rolepod_wp_recovery_restore_file/rolepod_wp_recovery_restore_snapshot— put a known-good file/theme back.rolepod_wp_recovery_safe_mode— fail-closed write lock while you work.rolepod_wp_maintenance_update— backup → maintenance-mode → update → probe → auto-rollback (core/plugin/theme).rolepod_wp_htaccess_edit— sentinel-backed .htaccess replace with root + inner-permalink probe + auto-restore.
Does not own:
- The actual fix to the buggy code →
wp-edit-plugin/wp-contentonce the site is reachable again. - Full-site restore / migration →
wp-migrate(rolepod_wp_site_restore). - Deep diagnosis of WHY →
wp-diagnose.
Decision tree (live fatal)
rolepod_wp_recovery_safe_mode(enabled: true)— stop the bleeding.rolepod_wp_recovery_status— confirm the fatal + what the guardian caught.rolepod_wp_recovery_list_changes(or wp-changes ledger) — find the last writes.- Neutralize the culprit:
- a plugin →
rolepod_wp_recovery_disable_plugin. - a file (functions.php, an include) →
rolepod_wp_recovery_disable_file, thenrolepod_wp_recovery_restore_filefrom the pre-edit backup if one exists. - a theme →
rolepod_wp_recovery_restore_snapshot.
- a plugin →
- Re-check
rolepod_wp_recovery_status→ site should be reachable. rolepod_wp_recovery_safe_mode(enabled: false)— clear the lock.- Hand off the real fix to
wp-edit-plugin/wp-content, thenwp-diagnose.
Safe maintenance (proactive)
- Update:
rolepod_wp_maintenance_update(scope: plugin|theme|core, slugs?, backup_id? [core], confirm_production?). It backs up, flips maintenance-mode (deactivating it in afinally), updates, health-probes, and — on red — pins core back / restores the backup and RE-PROBES before claimingrolled_back:true. A still-red site returnsrolled_back:false+ thebackup_idfor manual recovery. REST + companion + single-site only. - .htaccess:
rolepod_wp_htaccess_edit(content, confirm_production?). Writes.htaccess.bakfirst, replaces.htaccess, then probes the site ROOT and one inner pretty-permalink (a lost RewriteRules block leaves/= 200 but inner pages = 404 — a false green). On failure it restores and re-probes; if a malformed.htaccesstook Apache down so even the REST restore 500s, it saysrolled_back:falseand points you at.htaccess.bakto fix over SSH/filesystem.
Hard stops
recovery_statusshows no companion / guardian → the guardian mu-plugin is not installed; recovery endpoints won't answer. Tell the user to install the rolepod-wp companion (which ships the guardian).- Multisite →
rolepod_wp_maintenance_update/rolepod_wp_htaccess_editrefuse (MULTISITE_UNSUPPORTED); recover by hand. - Site still fatal after disabling the identified culprit → STOP, escalate to
wp-diagnose+ surface the guardian's recorded error verbatim; do not keep disabling plugins blindly.
Next phase
- Site reachable →
wp-diagnoseto find the root cause, then the right edit skill to fix it properly. - After a maintenance update →
wp-health-checkto confirm green.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

