All skills
wordpress avatar

/wp-wpcli-and-ops

@20324d2 official
by wordpresswordpress/agent-skills2.2k stars
327

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.

Use this Skill: https://skilld.dev/gh/wordpress/agent-skills/wp-wpcli-and-ops

This session only. Nothing lands on disk.

referencescron-and-cache.md

≈123 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Cron, caches, and rewrites

Use this file when debugging background jobs or “changes not visible”.

Cron

  • List scheduled events:
    • wp cron event list
  • Run a specific event now:
    • wp cron event run <hook>

Cache + rewrite

  • Flush object cache:
    • wp cache flush
  • Flush rewrite rules:
    • wp rewrite flush

Guardrails

  • Don’t “run all cron events” on production without understanding impact.
  • Cache flush can cause load spikes; coordinate if needed.

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides operational guidance and utility scripts for managing WordPress sites using WP-CLI. No security vulnerabilities or malicious behaviors were detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    9/9 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 20324d2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 3 months ago
Other metadata
compatibility
Targets WordPress 7.0+ (PHP 7.4.0+). Requires WP-CLI in the execution environment.
  • Database
  • DevOps
  • wordpress
  • wp-cli
  • migrations
  • multisite
  • search-replace
  • automation
  • php

README badge

README badge for wordpress/agent-skills/wp-wpcli-and-ops

Operates WordPress sites via WP-CLI commands: safe search-replace for domain migrations, plugin/theme management, database export/import, cron inspection, cache flushing, and multisite operations. Targets WordPress 6.9+ and requires WP-CLI in the execution environment; includes guardrails to prevent destructive commands on wrong environments.

Generated from the current SKILL.md.

Does this skill work with WordPress versions before 6.9?
No. The skill targets WordPress 6.9+ with PHP 7.2.24+. Older versions are not supported.
Can I use this skill on production without a backup?
The skill requires confirming environment safety and making backups before risky operations like search-replace or database modifications. Running destructive commands on production without a backup is explicitly warned against.
Does this skill handle multisite operations?
Yes. The skill includes procedures for multisite, including single-site targeting with `--url=` and network-wide operations with `--network`, but you must explicitly specify which scope you intend.
What if WP-CLI is not installed in my environment?
The skill includes an inspector script to check for WP-CLI availability. If it's not found, you need to install it via Composer, a container, or system package manager before proceeding.
Can this skill automate WordPress operations with scripts?
Yes. The skill covers automation via `wp-cli.yml` configuration files, shell scripts with error handling, and CI job patterns for repeatable operational tasks.

Generated from the current SKILL.md. These answers refresh after source changes.