How to Run WP-CLI Commands

Overview

WP-CLI (WordPress Command Line Interface) commands allow you to manage your WordPress® site directly from the command line.

Note:

By default, terminal access is enabled. If you do not have access to the Terminal interface, contact your hosting provider.

How to run WP-CLI commands

To access the Terminal interface, click on the terminal ()icon in the left menu bar. The Terminal interface will appear.

To run a WP-CLI command, you must first navigate to the root directory of your website. The root directory is located at ~/public_html/your_domain/ where your_domain is replaced by the domain name.

Enter the command you wish to run, starting with wp and followed by the command and the subcommand. For example, if you want to see a list of the plugins you have installed, run the command: wp plugin list.

You may run any available WP-CLI command. For a list of WP-CLI commands, read WordPress’s WP-CLI Commands documentation.