New advertisers: 50% off your first month with code FIRSTMONTHSee slots
wordpress avatar

Wp Wpcli And Ops

Operational WP-CLI playbook for search-replace, database backups, plugin and theme management, cron, cache flushing, and multisite.

skills.sh installs
6.2K
GitHub stars
2.4K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers safe URL and domain migrations via wp search-replace, with a backup and dry-run sequence before any real write
  • Includes wpcli_inspect.mjs to verify WP-CLI availability and site targeting through --path and --url before running commands
  • Enforces a confirm-environment, confirm-target, and back-up-first guardrail before any write operation
  • Designed for WordPress operators and CI pipelines that need repeatable scripts driven by wp-cli.yml

Install

$ npx -y skills add wordpress/agent-skills --skill wp-wpcli-and-ops -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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

Details

Repository
github.com/wordpress/agent-skills
Categories
PHP & Laravel, DevOps & Cloud
First seen
Apr 16, 2026

More from wordpress/agent-skills

All 17

Similar to Wp Wpcli And Ops

More PHP & Laravel