Install WP-CLI on cPanel shared hosting

If you have root-level access to the server you can follow this guide to install WP CLI on your WHM/cPanel server:

If you don’t have access to the root account nor can run sudo, but still have a user/level access to the terminal like from the cPanel terminal let’s say, then you can still install and use wp-cli.

cd /home/USERNAME/public_html/
curl -O
chmod +x wp-cli.phar

and then use the full path to the wp-cli.phar file:

/home/USERNAME/public_html/wp-cli.phar config list


  • USERNAME – is your cPanel username
  • /home/USERNAME/public_html/ – is the path to zour WordPress installation
  • config list – is an example command for WP-CLI

Was this post helpful?

Leave a Reply