📖 Complete documentation for WP-CLI https://make.wordpress.org/cli/handbook/
Find a file
2025-08-05 12:42:36 +02:00
.github Code quality setup 2024-05-21 11:46:27 +05:45
bin Lint fixes 2025-07-25 22:39:40 +02:00
commands Update handbook after v2.12 release 2025-05-13 10:01:47 +02:00
contributions Fix egoless programming link 2025-07-25 12:22:43 -07:00
guides Fix handbook information architecture 2025-06-25 15:38:39 +02:00
how-to Fix handbook information architecture 2025-06-25 15:38:39 +02:00
references Update hosting-companies.md 2025-08-05 12:25:12 +02:00
.gitignore Fix scaffold package 2024-08-01 16:24:32 +05:45
composer.json Add generated docs 2025-05-05 15:48:06 +02:00
contributions.md Fix handbook information architecture 2025-06-25 15:38:39 +02:00
guides.md Fix handbook information architecture 2025-06-25 15:38:39 +02:00
how-to.md Separate how-tos into dedicated pages. 2020-06-17 22:20:12 +01:00
index.md Fix handbook information architecture 2025-06-25 15:38:39 +02:00
LICENSE Update copyright date 2022-01-07 12:55:32 -06:00
phpcs.xml.dist Require PHP 7.2.24+ 2025-05-13 09:48:30 +02:00
README.md Fix issue with broken filename 2018-10-02 08:28:22 -07:00
references.md Fix handbook information architecture 2025-06-25 15:38:39 +02:00
wp-cli.yml Port over website code to generate internal API docs 2017-04-21 04:31:56 -07:00

wp-cli/handbook

These files comprise the WP-CLI handbook (make.wordpress.org/cli/handbook) and WP-CLI commands directory (developer.wordpress.org/cli/commands).

The documentation is located in GitHub to enable a pull request-based editing workflow.

Long-form documentation (e.g. "Commands cookbook") can be edited directly.

Internal API docs and command pages are generated dynamically from the WP-CLI codebase using the wp handbook series of commands.

Before running these commands the bash script bin/install-packages.sh should be run to install the latest versions of the non-bundled commands in bin/packages. Note wp must point to the target WP-CLI instance, i.e. the phar/git that contains the docblocks to be generated against, and should be run with WP_CLI_PACKAGES_DIR=bin/packages and WP_CLI_CONFIG_PATH=/dev/null.

So for instance to generate all dynamically created documentation against the nightly phar run:

wp cli update --nightly
bin/install_packages.sh
WP_CLI_PACKAGES_DIR=bin/packages WP_CLI_CONFIG_PATH=/dev/null wp handbook gen-all

All documentation is imported automatically into WordPress.org in a two step process:

  1. WordPress reads commands-manifest.json or handbook-manifest.json to understand all pages that need to be created.
  2. Each WordPress page has a markdown_source attribute specifying a Markdown file to be fetched, converted to HTML, and saved in the database.

For make.wordpress.org/cli, the import process is a WordPress plugin running a WP Cron job every 15 minutes. For developer.wordpress.org/cli, this is a class in the devhub theme running a WP Cron job every 12 hours.