# WP-CLI

The official WordPress command line: posts, media, users, plugins, and themes on any install, no browser.

WP-CLI is the WordPress project's command-line interface, maintained under wordpress.org with Automattic and hosting sponsors. About fifty top-level commands cover everything an agent needs to run a WordPress site: create and publish posts, import media, moderate comments, manage users, install plugins and themes, set options, and run database operations. It is the interface, not the CMS; the Listing is Operable only.

- Capabilities: operable
- Vertical: content-publishing
- Shape: product
- Form factor: cli
- Execution model: deterministic
- Provenance: human-written (recorded, never ranked)
- Repo: https://github.com/wp-cli/wp-cli (MIT), 5145 stars, last commit 2026-09-01
- Last activity: 2026-09-01
- Page: apps/wp-cli--wp-cli.html
- JSON: apps/wp-cli--wp-cli.json

## Use it when

- I want my agent to publish and update WordPress content from a script instead of the dashboard
- I maintain several WordPress sites and want plugin updates, users, and content handled from a shell

## Gotchas

- Needs shell access on the server running WordPress; many managed hosts expose WP-CLI, some do not
- PHP 7.2.24+ and WordPress 4.9+; limited Windows support
- Commands run with the server user's rights and bypass WordPress capability checks; scope carefully
- WordPress itself is GPL; WP-CLI is MIT
- Curator note: WordPress also ships an official mcp-adapter; a WordPress Listing could carry both as official interfaces

## Editions

- Free: Free, open source
  - binary: curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && chmod +x wp-cli.phar
  - installable: brew install wp-cli
  - container: https://make.wordpress.org/cli/handbook/installing/#installing-via-docker
  - source: https://github.com/wp-cli/wp-cli

## Operable: what an agent can drive

Operability: official. Interface: cli at https://developer.wordpress.org/cli/commands/ (published by the builder, local).

### Reach (partial coverage)

- Create, edit, and publish posts and pages: reachable. wp post create, update, list with post_status and meta
- Import media and regenerate thumbnails: reachable. wp media import, regenerate
- Moderate comments: reachable. wp comment create, update, delete, approve, spam
- Manage categories and tags: reachable. wp term
- Manage users and roles: reachable. wp user, wp role, wp cap
- Install and update plugins and themes: reachable. wp plugin install --activate, wp theme
- Read and set site options: reachable. wp option get, update
- Run database operations and search-replace: reachable. wp db, wp search-replace
- Administer multisite networks: reachable. wp site
- Lay out pages visually in the block editor: not reachable. post content is passed as raw HTML or block markup; there is no visual layout command

## Code stack

- Languages: PHP
- Frameworks: none
- Package manager: composer
- Database: none
- Hosting target: any host with shell access to a WordPress install

## Evidence and confidence

- formFactor: README: command-line interface distributed as a Phar (confidence 0.95)
- executionModel: no model at runtime (confidence 0.95)
- operability: documented at developer.wordpress.org/cli/commands under the WordPress project; README credits Automattic and host sponsors (confidence 0.95)
- effort: not listed as Adaptable; wp-cli.yml exists but adapting the CLI is not the use case (confidence 0)
- editions: README: Phar download, Composer, Homebrew, Docker; MIT (confidence 0.95)
- active: pushedAt 2026-09-01; 27 open issues
- provenance: project since 2011 under the WordPress umbrella (confidence 0.95)
- reach:  (confidence 0.95)

## Open questions

- Should the Curator fold this into a single WordPress Listing alongside the official mcp-adapter?

## Sources

- https://github.com/wp-cli/wp-cli (sourcing:content-publishing:github)
- https://developer.wordpress.org/cli/commands/ (analysis:content-publishing)
