I had difficulty installing WP-CLI properly on my WebFaction server because of the inability to use the sudo command to move the .phar file to the proper wp directory. The WebFaction support team was helpful as usual with some good instructions.
- Log in to your WebFaction account via SSH: https://docs.webfaction.com/user-guide/access.html
- Run the following command on the root directory:
curl -so ~/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.pharIt's probably a good idea to check the download URL there with the official WP-CLI installation instructions to make sure it hasn't changed.
- Run the following command:
chmod u+x ~/bin/wp
- Check to make sure it's installed correctly with