Back to Skills

wp-wpcli-and-ops

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.

1,733stars256forksUpdated 6/23/2026

Security Assessment

Safe(100/100)
Security Score100/100

About wp-wpcli-and-ops

The wp-wpcli-and-ops skill guides WordPress operational work via WP-CLI, including safe search-replace, database export and import, plugin, theme, user, and content management, cron, cache flushing, multisite operations, and scripting or automation. It targets WordPress 6.9+ and requires WP-CLI in the execution environment.

It leads with guardrails: because WP-CLI commands can be destructive, it confirms the environment (dev, staging, or production) and targeting (path and, for multisite, url) and makes a backup before risky operations. It runs a deterministic inspector to verify WP-CLI and site targeting, then chooses the right workflow: a safe search-replace sequence (export, dry-run, real replace, flush), plugin and theme operations, cron and cache debugging, or multisite changes. It prefers repeatable automation via wp-cli.yml defaults, logging scripts that stop on error, and read-only-by-default CI jobs, and includes verification steps and common failure modes.

It is most useful for developers and operators performing WordPress maintenance and migrations who want safe, targeted, and repeatable WP-CLI operations.

FAQ

When should I use this skill?

For WordPress operations via WP-CLI, such as safe search-replace, database export and import, plugin and theme management, cron, cache flushing, multisite, and automation.

How does it avoid destructive mistakes?

With guardrails that confirm the environment and targeting (path and url) and require a backup before risky writes, since WP-CLI commands can be destructive.

What is the safe search-replace sequence?

Export the database as a backup, run search-replace with dry-run to review impact, run the real replace with appropriate flags, then flush caches and rewrites.

How does it handle multisite?

It decides explicitly whether to operate on a single site (via url) or network-wide, since multisite changes can affect many sites.

How does it support automation?

Through wp-cli.yml defaults, shell scripts that log commands and stop on error, and CI jobs that run read-only checks by default.

All Files

9 files
SKILL.md3.9 KB
View
references/automation.md0.6 KB
View
references/debugging.md0.5 KB
View
references/multisite.md0.5 KB
View
references/safety.md0.8 KB
View
references/search-replace.md1.0 KB
View
references/packages-and-updates.md0.5 KB
View
references/cron-and-cache.md0.5 KB
View
scripts/wpcli_inspect.mjs3.0 KB
View

Install wp-wpcli-and-ops

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill