Skip to content

WP-CLI Overview

WP-CLI is a command-line interface for WordPress. It provides developers comfortable with the terminal tools to manage a WordPress site from the command line. WP-CLI is useful for everything from site administration to debugging site issues.

Access WP-CLI

WP-CLI comes preinstalled on WordPress.com and extends the shell to provide WordPress-specific command line tools. You can start running WP-CLI commands once you have connected to your site via SSH. 

Using WP-CLI

Once you have SSH access to your WordPress.com account, you run WP-CLI commands as you would normally.

wp post list

+----+--------------+-------------+---------------------+-------------+
| ID | post_title   | post_name   | post_date           | post_status |
+----+--------------+-------------+---------------------+-------------+
| 1  | Hello world! | hello-world | 2025-01-04 14:07:11 | publish    |
+----+--------------+-------------+---------------------+-------------+

Additional WP-CLI Resources

WP-CLI is available as a stand-alone install for local development environments. Many popular plugins for WordPress also extend WP-CLI to provide command-line tools for their features. Below is a list of additional WP-CLI resources that are handy to bookmark. 

Last updated: February 12, 2025