Last active
August 29, 2015 14:20
-
-
Save ajaegers/d4c5286e52581821cb43 to your computer and use it in GitHub Desktop.
One command to install WP-CLI on hosting using alias (if you cannot move wp-cli.phar in PATH)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '1. Downloading WP-CLI in ~/bin/...' \ | |
&& cd ~ && mkdir bin && cd bin \ | |
&& curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \ | |
&& chmod +x wp-cli.phar \ | |
&& echo '2. WP-CLI test...' \ | |
&& php wp-cli.phar --info \ | |
&& echo '3. Making wp alias...' \ | |
&& echo "alias wp='php ~/bin/wp-cli.phar'" >> ~/.bash_aliases \ | |
&& source ~/.bash_aliases \ | |
&& echo '4. Making bash wp alias to be available on each login...' \ | |
&& echo -e "if [ -f ~/.bash_aliases ]; then\n. ~/.bash_aliases\nfi" >> ~/.bash_profile \ | |
&& echo '5. Finished :)'\ | |
&& cd ~ && pwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment