All guides
No guide matches your search.
WP-CLI and operations
Review, build or debug WP-CLI commands and WordPress operations runbooks, with safe targeting, backups and a recovery plan.
On this page
When to use it
Use this skill for work done on the command line and for the procedures around it. It covers search-replace that keeps serialized data intact, domain moves, multisite targeting, batch jobs, cron and cache maintenance, backups and recoverable procedures. It does not review application code.
Where it stops
This skill owns the command, how it picks its target, its safety and the recovery procedure around it. Other work goes elsewhere:
- Plugin hooks, upgrade logic and storage design:
wp-devkit-plugin-development. - Migration or upgrade risk for a whole site:
wp-devkit-migration-upgrade-review. - CI and release pipelines:
wp-devkit-ci-cd-and-release-engineering. - Cache and query performance diagnosis:
wp-devkit-performance-review.
Run a review in Claude
With the plugin loaded, start a read-only review of a bounded target:
/wp-devkit:operations-review <target-path>The short form /wp-devkit:operations runs a quick scan.
Run a review in Codex, ChatGPT or Antigravity
Name the installed skill and keep the request small. Replace the target with your files or journey.
$wp-devkit-wpcli-and-ops
Review the target without editing files.
Read the project instructions and the skill's engineering contract first.
Separate confirmed findings from candidates and state the evidence and checks you could not run.The engineering contract is the set of rules every DevKit skill follows. It defines how findings are classified and how severe each one is.
Reference files
The agent loads only the file that matches your task.
command-authoring.md: used when you write a command. It covers registration, synopsis, dry run, exit codes, batching and memory,runcommandand testing.search-replace-and-migrations.md: used for domain moves, serialized and JSON data, GUIDs,--export, backups and destructive database commands.multisite-and-batch-operations.md: used for--urland--network, looping over sites,switch_to_blog, long jobs, WP-Cron versus system cron, cache and transient maintenance, and locks.environment-safety-and-recovery.md: used for config precedence and aliases, bootstrap risk,--skip-plugins, operation classes, backups and restore rehearsal, CI and the runbook template.wpcli-and-ops-workbook.md: used to triage symptoms, work through example decisions, recognize harmless look-alikes and choose verification steps.
How a review runs
- The agent reads the command source,
wp-cli.yml, aliases and scripts without loading WordPress. A command that loads WordPress runs the project's bootstrap code, so a read-only verb is not automatically a safe one. - It confirms the target:
--path,--url, alias, database prefix, network or single-site scope, and environment. It checks the installedwp help <command>before it assumes a flag exists. For example,--dry-runis defined per command. - It sorts each operation into a class: inventory, diagnostic with effects (
cron event run,cache flush,eval), reversible, or irreversible. An irreversible operation needs a verified backup, a dry run, a stated scope and approval. - For code, it checks that arguments are validated before any write. It looks for stable, keyed batches with a fixed upper bound, error handling on each query and write, truthful counts and a non-zero exit code on partial failure. The site context must be restored on every path, and a dry run must have no side effects.
- For runbooks, it checks for preconditions, exact commands, expected output, independent verification, a rollback with a rehearsed restore, abort criteria and redacted logs.
- It describes the plan and how to verify it without running maintenance or mutating commands. When the target, version or backup state cannot be established, the finding is
insufficient evidence.
What you get back
A review starts with the result and the scope it covered. Each confirmed finding gives the file and line, who is affected, the trigger, the path that reaches it, the impact, the confidence, the severity, a minimal fix and a regression check. Candidates and missing evidence are listed apart.
An implementation or runbook report gives the target, the plan, commands with expected output, verification, rollback, and which checks ran and which did not, with exit statuses.
Note
Reviews are read-only. A clean review covers only the inspected scope and does not certify the project. Ask for implementation as a separate, bounded task with a regression check.
Where to go next
Use review to fix to turn findings into a bounded change. Use Doctor and reports for environment and evidence tooling.
Was this page helpful?