LoginSignup
0
0

More than 5 years have passed since last update.

うちんとこのサーバーにwp-cli設置する備忘録

Last updated at Posted at 2015-06-26

ログイン

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
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0