WP-CLI
The CLI gives agents WordPress maintenance commands for plugins, configuration, content and site data through the terminal.
- 5,179 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- The CLI administers the selected installation, changes data and plugins, and executes additional PHP commands.
Install
Manual install
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.pharFirst recommended Phar-install command. It downloads the file; PHP verification and PATH placement follow.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The CLI administers the selected installation, changes data and plugins, and executes additional PHP commands.
This is third-party code. Review the repository files before installing.
What it does
WP-CLI runs WordPress administration without a browser. An agent can inspect the installation, prepare plugin or configuration maintenance and perform authorized content tasks. Commands use the selected site and its permissions. Maintenance operations extend beyond the web dashboard, and additional commands can extend the CLI. Users should verify the target site and separate inspection from changes.
Who it is for. WordPress administrators maintaining staging and production installations through agent-assisted terminal workflows.
Good fit when
- An update needs inspection of the selected installation.
- Repeated plugin tasks need an agreed command sequence.
- Content needs WordPress-native import or export.
- Authorized terminal access is available without convenient browser-admin access.
Not a fit when
- Production-changing operations lack a backup.
- The target WordPress installation is ambiguous.
- You expect commands to lack the site’s administrative capabilities.
Example request
Inspect the staging WordPress environment with WP-CLI and propose a plugin-update plan without applying it.Limitations
Requirements are PHP 7.2.24 or later and WordPress 4.9 or later; older supported releases may have reduced functionality. A Unix-like environment is recommended, with limited native Windows support. Commands can change plugins, settings and the database, so verify the installation path and back up before writes. The Phar and extra commands execute PHP with process permissions; use official sources and inspect extensions.
How to disable. Stop the active command and remove automated WP-CLI jobs. Uninstalling the executable does not undo site changes; restore or reverse them separately.
FAQ
How do I check the downloaded file?
Run `php wp-cli.phar --info` before moving it onto PATH.
Why is wp not found yet?
After downloading, make the Phar executable and place it on PATH as described in the install guide.
Does it support multisite?
Yes. Multisite administration is supported; select the correct site and context.
Can I add commands?
Yes. WP-CLI supports PHP command registration.
How do I inspect the installed environment?
Run `wp --info`.
Discussion
No questions or reviews yet.
Related
CLI toolsOfficial WordPress skill set for AI assistants: blocks, themes, plugins, REST API, WP-CLI and performance
A WordPress plugin that turns a site into an MCP server so an agent edits Elementor pages, menus, SEO and reads the shop.
A WordPress plugin with an MCP server: the agent runs PHP and WP-CLI on your site, edits files and uses Gutenberg over OAuth or an app password
55 skills for Claude Code, Codex and Cursor covering WordPress audits, edits, migrations and page builds through Respira MCP.
The project-local CLI checks PHP quality, style and complexity so an agent can inspect findings before changing the app.
A CLI that scaffolds an application from selected stack parts and helps add capabilities to an existing generated project.
README in short
WP-CLI includes operations unavailable in the normal dashboard and completion support for Bash and Zsh.