wp-wpcli-and-ops

Execute WP-CLI commands for safe WordPress operational changes.

3|2|Updated Jun 9, 2021
One-click install
npx skills add https://github.com/artisanworkshop/Japanized-for-WooCommerce --skill wp-wpcli-and-ops-artisanworkshop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wp-wpcli-and-ops
Source: https://github.com/artisanworkshop/Japanized-for-WooCommerce/tree/main/.claude/skills/wp-wpcli-and-ops
Command: npx skills add https://github.com/artisanworkshop/Japanized-for-WooCommerce --skill wp-wpcli-and-ops-artisanworkshop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

It prevents mis-targeted or risky WordPress operational work by providing a structured, safe workflow for performing WP-CLI tasks like migrations, installs, DB operations, and maintenance actions.

Core Features & Use Cases

  • WP-CLI operational workflows: perform deterministic site and environment changes using common commands such as wp search-replace, wp db export/import, plugin/theme management, cron inspection, and cache/rewrite flushing.
  • Safe targeting and blast-radius controls: enforce guardrails around --path and --url, distinguish single-site vs multisite/network-wide actions, and encourage backups/dry runs for destructive or high-impact operations.
  • Automation-ready patterns: standardize repeatable ops via wp-cli.yml plus scripted/CI approaches, including a dedicated inspector step to validate availability and detect whether WordPress/multisite are present.
  • Example use cases: migrating domains/protocols (safe search-replace), updating/activating plugins/themes for a specific site, debugging cron visibility issues, and running maintenance tasks across a multisite network.

Quick Start

Run the inspector to confirm WP-CLI availability and correct site targeting, then proceed with your planned safe operation for the intended environment.

Frequently Asked Questions about wp-wpcli-and-ops

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely run a WordPress search-replace migration without breaking production data?

To safely run a WordPress search-replace migration, you should perform a database backup or dry-run first, then execute the WP-CLI command with correct --path and --url targeting to ensure a minimal blast radius.

Does WP-CLI work with multisite network-wide operations for plugin activation and cache flushing?

Yes, WP-CLI works with multisite networks by allowing you to target specific sites or execute network-wide actions for plugin management and cache flushing using the appropriate --url parameter and multisite flags.

What's the best way to automate repeatable WordPress maintenance tasks like cron inspection and database exports?

The best way to automate repeatable WordPress maintenance tasks is by defining configurations in a wp-cli.yml file and executing scripted WP-CLI commands for database exports and cron inspection.

How do I validate WP-CLI availability and correct site targeting before executing WordPress operational changes?

You validate WP-CLI availability and correct site targeting by running an inspector step that detects whether WordPress or multisite is present and confirms the proper --path configuration before proceeding.

Can I use WP-CLI for safe plugin and theme lifecycle operations across local dev and staging environments?

Yes, you can use WP-CLI for safe plugin and theme lifecycle operations across local dev and staging by enforcing guardrails like backups and dry-runs to ensure deterministic environment changes.

Why does my WordPress database import fail when migrating domains between environments?

A WordPress database import may fail during domain migration if you do not execute a proper search-replace for protocols and domains, or if your WP-CLI --path targeting is incorrect for the destination environment.