ログイン
ssh user_name@hogehoge.example.com -o PreferredAuthentications=password
1 ホームディレクトリに移動
cd ~/
2 プログラム格納用ディレクトリ作成
mkdir bin
3 wp-cliをダウンロード
cd bin/
curl -Ok https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
4 実行権限追加
chmod +x wp-cli.phar
/usr/local/bin/php wp-cli.phar --info
- PATHに合わせて適宜修正
5 シンボリックリンク作成
ln -s wp-cli.phar wp
6 PATH設定
vi ~/.bash_profile
↓
PATH=$PATH:$HOME/bin
↓
PATH=$PATH:$HOME/bin:/usr/local/bin:/usr/local/mysql/bin
- これもサーバーのPATHに合わせて適宜修正
source ~/.bash_profile