wp-wpcli-and-ops

Run WP-CLI WordPress administration workflows with guarded automation and backups.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/HungNth/wordpress-notify-nth --skill wp-wpcli-and-ops-hungnth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wp-wpcli-and-ops
Source: https://github.com/HungNth/wordpress-notify-nth/tree/main/.opencode/skills/wp-wpcli-and-ops
Command: npx skills add https://github.com/HungNth/wordpress-notify-nth --skill wp-wpcli-and-ops-hungnth

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill provides a safe, repeatable workflow for WordPress administration using WP-CLI, enabling controlled execution of common tasks without manual guesswork.

Core Features & Use Cases

  • Safe, scripted WP-CLI workflows that enforce guardrails and backups.
  • Task coverage for wp search-replace (with dry-run), wp db export/import, plugin/theme/user/content management, cron, caching, and multisite operations.
  • Automation-friendly patterns using wp-cli.yml and shell scripts to enable repeatable deployments and maintenance tasks.
  • Real-world use: migrate a site to a new domain by performing a dry-run search-replace, exporting the database, activating updates, and flushing caches in a controlled sequence.

Quick Start

Run the WP-CLI inspector to validate your environment: node skills/wp-wpcli-and-ops/scripts/wpcli_inspect.mjs --path=<wordpress-root> [--url=<site-url>]

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 automate WordPress search-replace safely across staging and production?

Automate WordPress search-replace safely by running a dry-run first to preview changes, then executing the replacement with guardrails. This controlled workflow prevents accidental data corruption across local, staging, and production environments.

What is the best way to script repeatable WordPress database exports and plugin updates?

The best way to script repeatable WordPress database exports and plugin updates is using wp-cli.yml configurations with shell scripts. This approach enforces guardrails and enables automated, controlled deployment sequences.

Can I manage WordPress multisite operations and flush caches via command line?

Yes, you can manage WordPress multisite operations and flush caches via command line using WP-CLI. The workflow supports controlled execution of network-wide tasks, cron management, and cache clearing across environments.

Do I need a specific environment to run WP-CLI workflows for WordPress administration?

You need a WP-CLI-enabled execution environment and a valid WordPress root path to run WP-CLI workflows. Running the WP-CLI inspector validates your setup before executing any administration tasks.

How does a dry-run search-replace workflow prevent data loss during domain migration?

A dry-run search-replace workflow prevents data loss by previewing all database changes before execution. It allows you to verify the replacement scope and output without modifying your WordPress database.

What are the limitations of using WP-CLI for WordPress content and user management?

WP-CLI for WordPress content and user management requires a valid WordPress root path and a compatible execution environment. Without these dependencies, the guardrails and scripted workflows cannot execute properly.