Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
wordpress avatar

Wp Wpcli And Ops

  • 3.1k installs
  • 2k repo stars
  • Updated August 3, 2026
  • wordpress/agent-skills

wp-wpcli-and-ops is a WordPress skill for safe WP-CLI search-replace, DB ops, plugins, cron, cache, and multisite automation.

About

WP-CLI and Ops guides WordPress operational tasks via WP-CLI with guardrails for environment confirmation, path and URL targeting, and backup before destructive writes. Covered workflows include safe search-replace with dry-run then export backup, plugin and theme install or update, cron inspection and single-event runs, cache and rewrite flushing, multisite site and network operations, and repeatable automation with wp-cli.yml plus shell scripts. The procedure starts with wpcli_inspect.mjs to verify WP-CLI availability and site targeting, then routes to reference docs for search-replace, packages, cron, multisite, automation, safety, and debugging. Multisite work requires explicit --url for single sites or --network for network-wide commands. Verification reruns inspect after config changes and confirms URLs, package state, and cron or cache effects. Failure modes include wrong path targeting, missing wp-config, serialization issues from unsafe search-replace, and multisite commands hitting the wrong site URL.

  • Environment and blast-radius guardrails before write commands.
  • wpcli_inspect.mjs for deterministic WP-CLI and site targeting.
  • Safe search-replace sequence with db export and dry-run.
  • Multisite --url and --network targeting guidance.
  • Automation patterns with wp-cli.yml and CI read-only defaults.

Wp Wpcli And Ops by the numbers

  • 3,097 all-time installs (skills.sh)
  • +164 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #51 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

wp-wpcli-and-ops capabilities & compatibility

Capabilities
wp cli environment inspection script · safe search replace with backup and dry run · plugin and theme package operations · cron and cache management commands · multisite url and network targeting · automation via wp cli.yml and shell scripts
Use cases
devops · ci cd
Pricing
Free
From the docs

What wp-wpcli-and-ops says it does

WP-CLI commands can be destructive. Before running anything that writes:
SKILL.md
node skills/wp-wpcli-and-ops/scripts/wpcli_inspect.mjs --path=<path>
SKILL.md
npx skills add https://github.com/wordpress/agent-skills --skill wp-wpcli-and-ops

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3.1k
repo stars2k
Security audit3 / 3 scanners passed
Last updatedAugust 3, 2026
Repositorywordpress/agent-skills

How do I run WP-CLI operations without hitting the wrong site or skipping backups on destructive changes?

Run safe WordPress operations with WP-CLI including search-replace, DB export, plugins, cron, cache, and multisite automation.

Who is it for?

WordPress operators running migrations, plugin updates, cron debugging, or multisite maintenance via WP-CLI.

Skip if: Skip for greenfield theme development without WP-CLI or non-WordPress stacks.

When should I use this skill?

User runs wp search-replace, db export, plugin ops, cron, cache flush, or multisite commands.

What you get

Verified WP-CLI targeting, completed ops workflow, and post-change smoke checks.

  • Executed wp-cli command logs
  • Migrated or exported SQL databases

By the numbers

  • Targets WordPress 6.9+ on PHP 7.2.24+

Files

SKILL.mdMarkdownGitHub ↗

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 expected execution environment.

2) Choose the right workflow

A) Safe URL/domain migration (search-replace)

Follow a safe sequence:

1. wp db export (backup) 2. wp search-replace --dry-run (review impact) 3. Run the real replace with appropriate flags 4. Flush caches/rewrite if needed

Read:

  • references/search-replace.md
B) Plugin/theme operations

Use wp plugin * / wp theme * and confirm you’re acting on the intended site (and network) first.

Read:

  • references/packages-and-updates.md
C) Cron and queues

Inspect cron state and run individual events for debugging rather than “run everything blindly”.

Read:

  • references/cron-and-cache.md
D) Multisite operations

Multisite changes can affect many sites. Always decide whether you’re operating:

  • on a single site (--url=), or
  • network-wide (--network / iterating sites)

Read:

  • references/multisite.md

3) Automation patterns (scripts + wp-cli.yml)

For repeatable ops, prefer:

  • wp-cli.yml for defaults (path/url, PHP memory limits)
  • shell scripts that log commands and stop on error
  • CI jobs that run read-only checks by default

Read:

  • references/automation.md

Verification

  • Re-run wpcli_inspect after changes that could affect targeting or config.
  • Confirm intended side effects:
  • correct URLs updated
  • plugins/themes in expected state
  • cron/caches flushed where needed
  • If there’s a health check endpoint or smoke test suite, run it after ops changes.

Failure modes / debugging

  • “Error: This does not seem to be a WordPress installation.”
  • wrong --path, wrong container, or missing wp-config.php
  • Multisite commands affecting the wrong site
  • missing --url or wrong URL
  • Search-replace causes unexpected serialization issues
  • wrong flags or changing serialized data unsafely

See:

  • references/debugging.md

Escalation

  • If you cannot confirm environment safety, do not run write operations.
  • If the repo uses containerized tooling (Docker/wp-env) but you can’t access it, ask for the intended command runner or CI job.

Related skills

Forks & variants (1)

Wp Wpcli And Ops has 1 known copy in the catalog totaling 1 installs. They canonicalize to this original listing.

How it compares

Pick wp-wpcli-and-ops for live WordPress operational commands instead of block theme or Gutenberg block development skills.

FAQ

What run before search-replace?

Export the database, run search-replace --dry-run, then execute the real replace with correct flags.

Why use wpcli_inspect first?

It confirms WP-CLI availability and correct path or URL targeting before writes.

How avoid multisite mistakes?

Pass --url for a single site or --network only when network-wide impact is intended.

Is Wp Wpcli And Ops safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

DevOps & CI/CDdeployinfra

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.