How-To Install WP-CLI on shared hosting

To do this you need SSH/telnet support

Run the following commands in the terminal
cd ~
mkdir wp-cli
cd wp-cli
curl -k -L https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar > wp-cli.phar
echo ‘alias wp=”php ~/wp-cli/wp-cli.phar”‘ >> ~/.bashrc
source ~/.bashrc

2 thoughts on “How-To Install WP-CLI on shared hosting

  1. This worked great for me. But note that if you copy the second-to-last line from the browser directly into the terminal, the apostrophes and quotation marks will be screwed up and it won’t work. I had to re-type them.

Leave a Reply