How-To Install WP-CLI on shared hosting (updated)

This is the second update version of How-To Install WP-CLI on shared hosting and How-To Install WP-CLI on shared hosting 2. This guide has been tested and is working for my provider and WP-CLI 0.22.0

rm -rf ~./wp-cli
cd ~.
mkdir wp-cli
cd ~./wp-cli
curl -sS https://getcomposer.org/installer | php
alias composer='php composer.phar'
composer create-project wp-cli/wp-cli --no-dev
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
alias wp='php ~./wp-cli/wp-cli.phar'

How-To Install WP-CLI on shared hosting

Updated version of How-To Install WP-CLI on shared hosting. This guide has been tested and is working for my provider and WP-CLI 0.18.0

rm -rf ~./wp-cli
mkdir ~./wp-cli
cd ~./wp-cli
composer create-project wp-cli/wp-cli --no-dev
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
alias wp='php ~./wp-cli/wp-cli.phar'

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