Installation
Note: WP-CLI comes pre-installed with some popular shared hosting providers (e.g. SiteGround).
** Download the wp-cli.phar file using wget or curl:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
Note: With root access place the file in /usr/local/bin
. On a shared hosting account place it directly in the home directory (~
) or ~/bin
.
** Verify that the WP-CLI file runs correctly:
php wp-cli.phar --info
** Set up an alias for the WP-CLI executable (fill in correct username):
echo 'alias wp="php /home/username/wp-cli.phar"' >> ~/.bashrc