wordpress avatar

Wp Wpcli And Ops

This is a guardrails-first approach to WordPress operations through WP-CLI. It walks you through safe search-replace workflows for domain migrations, database exports, plugin and theme management, cron debugging, and multisite targeting. The procedure starts by confirming environment and blast radius before any write operation, which is exactly right given how many production databases have been accidentally torched by a careless search-replace. It includes an inspector script to verify WP-CLI availability and site targeting, then breaks down workflows by operation type with specific flags and dry-run steps. The multisite guidance around --url and --network targeting is especially useful since that's where most accidental cross-site damage happens. Good for teams that need repeatable, auditable WordPress ops without the anxiety.

skills.sh installs
6K
GitHub stars
2.3K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/wordpress/agent-skills
Categories
AI & Agent Building, Automation & Workflows, CLI & Terminal, PHP & Laravel
First seen
Apr 16, 2026

More from wordpress/agent-skills

All 17
1wordpress avatarwp-project-triagewordpress/agent-skillsUse when you need a deterministic inspection of a WordPress repository (plugin/theme/block theme/WP core/Gutenberg/full site) including tooling/tests/version hi5.9Kskills.sh installs
2aws avataraws-blocksaws/agent-toolkit-for-awsGuides building full-stack applications with AWS Blocks — an Infrastructure-from-Code framework. Applies when creating APIs, selecting Building Blocks (KVStore,5.9Kskills.sh installs
3aws avatarquerying-aws-cloudwatchaws/agent-toolkit-for-awsRuns SQL queries on CloudWatch Logs data exported as Apache Iceberg tables in S3 Tables. Covers VPC Flow Logs, WAF logs, CloudFront access logs, Route 53 resolv5.9Kskills.sh installs
4wordpress avatarwp-block-developmentwordpress/agent-skillsUse when developing WordPress (Gutenberg) blocks: block.json metadata, register_block_type(_from_metadata), attributes/serialization, supports, dynamic renderin5.9Kskills.sh installs
5openai avatarjupyter-notebookopenai/skillsUse when the user asks to create, scaffold, or edit Jupyter notebooks (`.ipynb`) for experiments, explorations, or tutorials; prefer the bundled templates and r5.9Kskills.sh installs
6vintasoftware avatardjango-expertvintasoftware/django-ai-pluginsExpert Django backend development guidance. Use when creating Django models, views, serializers, or APIs; debugging ORM queries or migrations; optimizing databa5.9Kskills.sh installs