| name | wp-wpcli-and-ops |
| description | Use when working with WP-CLI (wp) for WordPress operations: safe search-replace, db export/import, plugin/theme/user/content management, cron, cache flushing, multisite, and scripting/automation with wp-cli.yml. |
| compatibility | Targets WordPress 7.0+ (PHP 7.4.0+). Requires WP-CLI in the execution environment. |
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:
- Confirm environment (dev/staging/prod).