WordPress WP-CLI Admin
Use this skill when a WordPress task belongs in wp, not /wp-json.
The point of this skill is not to memorize every command. The point is to get to the right command family, attach the right global flags, inspect the target install first, and avoid reckless write operations.
Use This Skill For
- checking whether a target install is healthy and reachable with
wp
- plugin and theme management
- users, roles, comments, posts, pages, terms, and media operations
- options, transients, rewrites, cron, and cache-related site work
- core version, update, checksum, and maintenance tasks
- database export, import, and search-replace work
- multisite-aware administration when
--url matters
Do Not Use This Skill For
- REST-only integrations where the caller has HTTP access but not shell access
- building custom WP-CLI commands or packages
- blind destructive operations without a read-first pass or backup path
Workflow
1. Inspect The Install First
Start with:
scripts/inspect-install.sh --path /srv/www/site
scripts/inspect-install.sh --path /srv/www/site --url https://example.com
This checks that wp exists, confirms the path looks like a WordPress install, and prints useful status for core, URLs, plugins, and themes.
If you need the live command tree:
scripts/list-commands.sh
scripts/list-commands.sh --group plugin
2. Choose The Right Command Family
Read references/command-families.md.
Default mapping:
- core health or updates:
core
- installed code:
plugin, theme, language
- content and taxonomy:
post, page, comment, term, category, tag
- accounts and permissions:
user, role, cap, super-admin
- config and runtime:
option, transient, cron, rewrite, cache
- database and migration:
db, search-replace
- multisite:
site, network, super-admin
3. Attach The Right Global Flags
Read references/global-flags-and-safety.md.
Common flags:
--path=<path>
--url=<url>
--user=<login>
--ssh=<target>
--http=<url>
--skip-plugins
--skip-themes
--debug
--quiet
--format=json
4. Prefer Read-First Commands
Examples:
wp plugin list --format=table
wp theme list --format=table
wp option get home
wp core version
wp cron event list
Only then move to write operations such as plugin update, search-replace, option update, or db import.
5. Treat High-Risk Operations As Change Windows
Before destructive work:
- export the database
- use
search-replace --dry-run when available
- verify the target URL in multisite
- avoid running broad updates without confirming versions and dependencies
Files
scripts/inspect-install.sh: inspect a target WordPress path with WP-CLI
scripts/list-commands.sh: print wp help or wp help <group> for live command discovery
references/command-families.md: command family cheat sheet for common WordPress admin tasks
references/global-flags-and-safety.md: global arg patterns, remote execution, and destructive-operation rules
1---2name: wordpress-wp-cli-admin3description: Operate WordPress installs through WP-CLI for inspection, core maintenance, plugin and theme management, users, options, content, media, cron, database tasks, and multisite-aware administration. Use when shell, SSH, or node-local access exists and the task should be done with `wp` instead of the REST API or custom WP-CLI package development.4---56# WordPress WP-CLI Admin78Use this skill when a WordPress task belongs in `wp`, not `/wp-json`.910The point of this skill is not to memorize every command. The point is to get to the right command family, attach the right global flags, inspect the target install first, and avoid reckless write operations.1112## Use This Skill For1314- checking whether a target install is healthy and reachable with `wp`15- plugin and theme management16- users, roles, comments, posts, pages, terms, and media operations17- options, transients, rewrites, cron, and cache-related site work18- core version, update, checksum, and maintenance tasks19- database export, import, and search-replace work20- multisite-aware administration when `--url` matters2122## Do Not Use This Skill For2324- REST-only integrations where the caller has HTTP access but not shell access25- building custom WP-CLI commands or packages26- blind destructive operations without a read-first pass or backup path2728## Workflow2930### 1. Inspect The Install First3132Start with:3334```bash35scripts/inspect-install.sh --path /srv/www/site36scripts/inspect-install.sh --path /srv/www/site --url https://example.com37```3839This checks that `wp` exists, confirms the path looks like a WordPress install, and prints useful status for core, URLs, plugins, and themes.4041If you need the live command tree:4243```bash44scripts/list-commands.sh45scripts/list-commands.sh --group plugin46```4748### 2. Choose The Right Command Family4950Read [references/command-families.md](references/command-families.md).5152Default mapping:5354- core health or updates: `core`55- installed code: `plugin`, `theme`, `language`56- content and taxonomy: `post`, `page`, `comment`, `term`, `category`, `tag`57- accounts and permissions: `user`, `role`, `cap`, `super-admin`58- config and runtime: `option`, `transient`, `cron`, `rewrite`, `cache`59- database and migration: `db`, `search-replace`60- multisite: `site`, `network`, `super-admin`6162### 3. Attach The Right Global Flags6364Read [references/global-flags-and-safety.md](references/global-flags-and-safety.md).6566Common flags:6768- `--path=<path>`69- `--url=<url>`70- `--user=<login>`71- `--ssh=<target>`72- `--http=<url>`73- `--skip-plugins`74- `--skip-themes`75- `--debug`76- `--quiet`77- `--format=json`7879### 4. Prefer Read-First Commands8081Examples:8283```bash84wp plugin list --format=table85wp theme list --format=table86wp option get home87wp core version88wp cron event list89```9091Only then move to write operations such as `plugin update`, `search-replace`, `option update`, or `db import`.9293### 5. Treat High-Risk Operations As Change Windows9495Before destructive work:9697- export the database98- use `search-replace --dry-run` when available99- verify the target URL in multisite100- avoid running broad updates without confirming versions and dependencies101102## Files103104- `scripts/inspect-install.sh`: inspect a target WordPress path with WP-CLI105- `scripts/list-commands.sh`: print `wp help` or `wp help <group>` for live command discovery106- `references/command-families.md`: command family cheat sheet for common WordPress admin tasks107- `references/global-flags-and-safety.md`: global arg patterns, remote execution, and destructive-operation rules