Get started with WP-CLI
WP-CLI is the command-line interface for WordPress, and it comes preinstalled on WordPress.com. Use it to manage your site from the terminal, from routine administration to debugging site issues.
Access WP-CLI
WP-CLI is preinstalled on WordPress.com, so you run its commands in an SSH session on your site. SSH credentials belong to a single site, so create them and enable SSH on each site you want to manage with WP-CLI. Our SSH guide covers creating credentials, enabling SSH, and connecting from your terminal.
Use WP-CLI
Once you’re connected to your site over SSH, run WP-CLI commands as you would on any other WordPress install. For example, wp post list returns the site’s posts:
wp post list
+----+--------------+-------------+---------------------+-------------+
| ID | post_title | post_name | post_date | post_status |
+----+--------------+-------------+---------------------+-------------+
| 1 | Hello world! | hello-world | 2025-01-04 14:07:11 | publish |
+----+--------------+-------------+---------------------+-------------+WordPress.com blocks some core WP-CLI commands and adds commands of its own. A blocked command returns a “forbidden” error. Run wp --help to list the commands available on your site, or see Platform-specific commands for the WordPress.com additions. For commands you’ll use often, see Common commands.
Additional WP-CLI resources
You can also install WP-CLI for use in local development environments. Many plugins add WP-CLI commands for their features, such as WooCommerce. The following resources cover installing WP-CLI and the commands for WordPress and WooCommerce:
Last updated: November 19, 2026