1. 「wp-cli」インストール
cd ~
# ディレクトリ作成
mkdir wp-cli
cd ~/wp-cli
# wp-cli.pharをダウンロード
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
# 実行権限付与
chmod +x wp-cli.phar
# 動作確認
php wp-cli.phar --info
2. 「wp-completion.bash」インストール
cd ~/wp-cli
wget https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash
3. 「.bash_profile」編集
cd ~
cp -ip .bash_profile .bash_profile.org
diff .bash_profile.org .bash_profile
vi .bash_profile
# 以下追記
source ~/wp-cli/wp-completion.bash
diff .bash_profile.org .bash_profile
source ~/.bash_profile
4. 「.bashrc」編集
cp -ip .bashrc .bashrc.org
diff .bashrc.org .bashrc
vi .bashrc
# 以下追記
alias wp='php ~/wp-cli/wp-cli.phar'
diff .bashrc.org .bashrc
. ~/.bashrc