WP-CLI has many features but like all WordPress plugins can be installed packages to add functionality to it.
For example, you can install the wp-cli/wp-super-cache-cli package to add features to the WP Super Cache plugin. You can consult the official WP-CLI Package Index for more information on available packages.
To install a WP-CLI package we recommend that you follow the steps described below.
- Log in to the server via SSH with the cPanel user who owns the website where you want to install the plugin.
- Use the cd command to access the root folder of the website, eg:
cd public_html/my_website
Run the following command:
wp package install danielbachhuber/wp-cli-stat-command
Replace danielbachhuber/wp-cli-stat-command with the actual package you want to install.
The command given as an example will install a useful plugin to review statistics / data about your WordPress site.
After the installation you will be able to see the following output:
[email protected] [~/public_html/wordpress]# wp package install danielbachhuber/wp-cli-stat-command Installing package danielbachhuber/wp-cli-stat-command (dev-master) Updating /home/exampl3/.wp-cli/packages/composer.json to require the package... Using Composer to install the package... --- Loading composer repositories with package information Updating dependencies Resolving dependencies through SAT Dependency resolution completed in 0.242 seconds Analyzed 5729 packages to resolve dependencies Analyzed 373408 rules to resolve dependencies Package operations: 1 install, 0 updates, 0 removals Installs: danielbachhuber/wp-cli-stat-command:dev-master d308e5b - Installing danielbachhuber/wp-cli-stat-command (dev-master d308e5b) Writing lock file Generating autoload files --- Success: Package installed.
For assistance in applying the above instructions on HostX servers please contact us. HostX offers the fastest WordPress hosting and can help you solve your problems.
