Skip to content

Instantly share code, notes, and snippets.

@nmyers
Forked from raquelmsmith/webfaction-wp-cli.md
Created June 1, 2018 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmyers/0d7c7a7788b4c711554e64c6c75958ac to your computer and use it in GitHub Desktop.
Save nmyers/0d7c7a7788b4c711554e64c6c75958ac to your computer and use it in GitHub Desktop.
How to install WP-CLI on WebFaction

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.

  1. Log in to your WebFaction account via SSH: https://docs.webfaction.com/user-guide/access.html
  2. Run the following command on the root directory: curl -so ~/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar It'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.
  3. Run the following command: chmod u+x ~/bin/wp
  4. Check to make sure it's installed correctly with wp --info.

To use WP-CLI in one of your web apps, navigate to the directory for your web app. Eg. cd webapps/myawesomesite. Run the WP-CLI commands there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment