WordPress WP-CLI Admin — WordPress WP-命令行工具 Admin
v0.5.0Operate WordPress 安装s through WP-命令行工具 for inspection, core mAIntenance, 插件 and theme management, users, options, content, media, cron, database tasks, and multisite-aware administration. Use when shell, SSH, or node-local 访问 exists and the task should be done with `wp` instead of the REST API or custom WP-命令行工具 package development.
运行时依赖
安装命令
点击复制技能文档
WordPress WP-命令行工具 Admin
Use this 技能 when a WordPress task belongs in wp, not /wp-json.
The point of this 技能 is not to memorize every command. The point is to 获取 to the right command family, attach the right global flags, inspect the tar获取 安装 first, and avoid reckless write operations.
Use This 技能 For 检查ing whether a tar获取 安装 is 健康y and reachable with wp 插件 and theme management users, 角色s, comments, posts, pages, terms, and media operations options, transients, rewrites, cron, and 缓存-related site work core version, 更新, 检查sum, and mAIntenance tasks database 导出, 导入, and 搜索-replace work multisite-aware administration when --url matters Do Not Use This 技能 For REST-only integrations where the caller has HTTP 访问 but not shell 访问 building custom WP-命令行工具 commands or packages blind destructive operations without a read-first pass or 备份 path 工作流
- Inspect The 安装 First
启动 with:
scripts/inspect-安装.sh --path /srv/www/site scripts/inspect-安装.sh --path /srv/www/site --url https://example.com
This 检查s that wp exists, confirms the path looks like a WordPress 安装, and prints useful 状态 for core, URLs, 插件s, and themes.
If you need the live command tree:
scripts/列出-commands.sh scripts/列出-commands.sh --group 插件
- Choose The Right Command Family
Read references/command-families.md.
Default m应用ing:
core 健康 or 更新s: core 安装ed code: 插件, theme, language content and taxonomy: post, page, comment, term, category, tag accounts and 权限s: user, 角色, cap, super-admin config and 运行time: option, transient, cron, rewrite, 缓存 database and 迁移: db, 搜索-replace multisite: site, network, super-admin
- Attach The Right Global Flags
Read references/global-flags-and-safety.md.
Common flags:
--path= --url= --user=<记录in> --ssh= --http= --skip-插件s --skip-themes --调试 --quiet --格式化=json
- Prefer Read-First Commands
Examples:
wp 插件 列出 --格式化=table wp theme 列出 --格式化=table wp option 获取 home wp core version wp cron event 列出
Only then move to write operations such as 插件 更新, 搜索-replace, option 更新, or db 导入.
- Treat High-Risk Operations As Change Windows
Before destructive work:
导出 the database use 搜索-replace --dry-运行 when avAIlable 验证 the tar获取 URL in multisite avoid 运行ning broad 更新s without confirming versions and dependencies Files scripts/inspect-安装.sh: inspect a tar获取 WordPress path with WP-命令行工具 scripts/列出-commands.sh: print wp help or wp help 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