wp-wpcli-and-opslisted
Install: claude install-skill aiskillstore/marketplace
# WP-CLI and Ops
## When to use
Use this skill when the task involves WordPress operational work via WP-CLI, including:
- `wp search-replace` (URL changes, domain migrations, protocol switch)
- DB export/import, resets, and inspections (`wp db *`)
- plugin/theme install/activate/update, language packs
- cron event listing/running
- cache/rewrite flushing
- multisite operations (`wp site *`, `--url`, `--network`)
- building repeatable scripts (`wp-cli.yml`, shell scripts, CI jobs)
## Inputs required
- Where WP-CLI will run (local dev, staging, production) and whether it’s safe to run.
- How to target the correct site root:
- `--path=<wordpress-root>` and (multisite) `--url=<site-url>`
- Whether this is multisite and whether commands should run network-wide.
- Any constraints (no downtime, no DB writes, maintenance window).
## Procedure
### 0) Guardrails: confirm environment and blast radius
WP-CLI commands can be destructive. Before running anything that writes:
1. Confirm environment (dev/staging/prod).
2. Confirm targeting (path/url) so you don’t hit the wrong site.
3. Make a backup when performing risky operations.
Read:
- `references/safety.md`
### 1) Inspect WP-CLI and site targeting (deterministic)
Run the inspector:
- `node skills/wp-wpcli-and-ops/scripts/wpcli_inspect.mjs --path=<path> [--url=<url>]`
If WP-CLI isn’t available, fall back to installing it via the project’s documented tooling (Composer, container, or system package), or ask for the expecte