WP-CLI has been added to our cloud hosting platform's list of supported tools

While WordPress' admin dashboard is user-friendly and feature-rich, it can occasionally be slow and laborious to navigate.

Delays in accessing desired features or page loading times can be frustrating.

Enter WP-CLI, the WordPress Command Line Interface, which offers a solution to these challenges. WP-CLI allows you to take direct control of your projects through straightforward commands.

We are pleased to announce that WP-CLI is now fully supported on our cloud hosting platform, as well as on all dedicated servers and virtual servers utilizing the Web Hosting Control Panel.

What is WP-CLI?

WP-CLI, short for WordPress Command Line Interface, is an extension that combines the capabilities of WordPress with the convenience of command-line interactions on Unix-based systems. It empowers users to efficiently manage their WordPress installations using text-based commands.

This command-line tool streamlines various tasks typically performed on the backend of a website. For instance, instead of navigating through menus and search interfaces to install a plugin, you can achieve the same result with a straightforward command like:

wp plugin install user-switching --activate

In this command-line example, the User Switching plugin is both installed and activated swiftly.

How to Utilize WP-CLI?

To make the most of WP-CLI, it's necessary to have SSH access to your account within our system. You can employ our provided Web SSH interface or any terminal client you prefer for this purpose.

Once you've established a connection to your account, navigate to the directory where your WordPress installation resides.

Note: If WordPress is installed within a directory like "/wordpress" rather than the root folder of your domain, you should enter the "/wordpress" folder.

From this location, execute the command wp --info. This will generate an output resembling the following:

  • $ wp --info
  • OS: Linux #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64
  • Shell: /usr/bin/zsh
  • PHP binary: /usr/bin/php8.1
  • PHP version: 8.1.0
  • php.ini used: /etc/php/8.1/cli/php.ini
  • MySQL binary: /usr/bin/mysql
  • MySQL version: mysql Ver 8.0.27-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
  • SQL modes:
  • WP-CLI root dir: /home/wp-cli/
  • WP-CLI vendor dir: /home/wp-cli/vendor
  • WP_CLI phar path:
  • WP-CLI packages dir: /home/wp-cli/.wp-cli/packages/
  • WP-CLI global config:
  • WP-CLI project config: /home/wp-cli/wp-cli.yml
  • WP-CLI version: 2.7.1

If you observe this output, you can start using WP-CLI immediately.

Handy WP-CLI Commands to Kickstart Your Usage

With WP-CLI, you can swiftly undertake various WordPress tasks. Here are some essential commands to get you started:

  • 1. Installing a WordPress Theme: To install a WordPress theme, use the following command: wp theme install twentyten
  • 2. Activating a Theme: Once installed, you can activate a theme to make it the active theme for your site: wp theme activate twentyten
  • 3. Managing Plugins: Similarly, you can manage plugins efficiently. For instance, installing the popular WooCommerce plugin can be done with: wp plugin install woocommerce
  • You can activate or deactivate plugins just as easily: wp plugin activate woocommerce / wp plugin deactivate woocommerce
  • 4. Updating WordPress Core: Keeping your WordPress version up to date is crucial. WP-CLI allows you to update the core with a simple command: wp core update
  • 5. Updating Specific Plugins or All: Update a specific plugin like WooCommerce: wp plugin update woocommerce
  • Alternatively, update all installed plugins at once: wp plugin update --all
  • 6. Theme Updates: You can manage theme updates in a similar manner: wp theme update twentyten
    wp theme update --all

Note: WP-CLI supports themes and plugins exclusively from the official WordPress repository.

WP-CLI offers an extensive range of capabilities, including the automation of backups, updates, and various other repetitive tasks. Using WP-CLI is more straightforward than it might seem initially, and there are abundant resources available if you wish to delve deeper.

These resources encompass documentation on its official website, a user guide, and numerous practical examples to assist your proficiency.