2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WP-CLI 備忘録

Posted at

インストール

$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
$ chmod +x wp-cli.phar
$ sudo mv wp-cli.phar /usr/local/bin/wp

OR

$ brew install wp-cli

ユーザー作成

$ wp user create {user_name} {user_email} --role=author --user_pass={user_pass} --first_name="テスト"

usermeta追加

$ wp user meta add {user_email|id} {meta_key} {meta_value}

SSH(Vagrant) 設定

$ cd /your/vagrant/project/path
$ vagrant ssh-config >> ~/.ssh/config

config のHost部分を使ってアクセスができるようになる。

ユーザー作成

wp @{SSH_HOST} user create {user_name} {user_email} --role=author --user_pass={user_pass} --first_name="テスト"
2
3
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
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?