Created
August 4, 2015 13:05
-
-
Save zytzagoo/c268b793e9dc4144daee to your computer and use it in GitHub Desktop.
wp-cli quick install/setup
This file contains hidden or 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
mkdir -p ~/bin | |
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O ~/bin/wp | |
chmod +x ~/bin/wp | |
wget https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash -O ~/.wp-completion.bash | |
if [[ ! -s "$HOME/.bash_profile" && -s "$HOME/.profile" ]] ; then | |
profile_file="$HOME/.profile" | |
else | |
profile_file="$HOME/.bash_profile" | |
fi | |
if ! grep -q 'wp-completion.bash' "${profile_file}" ; then | |
echo "Editing ${profile_file} to source ~/.wp-completion.bash" | |
echo "source \"$HOME/.wp-completion.bash\"" >> "${profile_file}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment