How to manage WordPress via command line

June 7, 2023 / WordPress

In this article, we will explain how to manage WordPress from the command line with the cPanel WordPress Toolkit.

WordPress Toolkit can be managed via command-line using the WordPress-toolkit command in SSH or WHM >> Terminal as the root user:

 

# which wp-toolkit
/usr/local/bin/wp-toolkit

To see a list of options; WordPress-toolkit supports, run the following command in SSH or WHM >> Terminal as the root user:

 

wp-toolkit --help

Run the following commands in order to learn more about how a given option is used via  SSH or WHM >> Terminal as the root user (You can replace $OPTION with the option you would like information on):

 

wp-toolkit --help -command $OPTION

For Example: You will get this output:

 

# wp-toolkit --help -command wp-cli
Usage:
wp-toolkit --wp-cli
-instance-id INSTANCE_ID|-domain-name DOMAIN_NAME -path PATH
-- WP_SUBCOMMAND

Executes a wp-cli call to the selected WordPress installation.

Arguments:
-instance-id WordPress installation ID
-domain-name Domain name
-path The relative path from the domain's document root
directory. Example: /subdirectory

In this way, you can manage WordPress from the command line with the cPanel wordpress toolkit.

For more information on WordPress , visit our knowledge base section. Check our lastest WordPress Hosting plans

Spread the love