Knowledgebase:
How do I enable the WordPress CLI (wp-cli) on my hosting account?
Posted by Brian F., Last modified by Brian F. on 31 July 2017 03:56 PM
You can install the WordPress CLI (wp-cli) on any hosting plan by following these instructions:
  1. Connect to your hosting plan via SSH

  2. Once connected run the following command in your SSH terminal: curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

  3. The phar file needs to be executable so we'll chmod it by typing: chmod +x wp-cli.phar

  4. Now that the wp-cli is installed we'll modify your .bashrc file to respect the wp command. To do this, type the following in your SSH terminal: alias wp='~/wp-cli.phar'

  5. Next type the following command in your terminal: echo "alias wp='~/wp-cli.phar'" >> .bashrc

  6. Lastly we'll use the source command to make sure bash initializes properly: source .bashrc
You should now be able to change to your active Wordpress installation directory and use the wp command.
(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).