LoginSignup
49
51

More than 5 years have passed since last update.

WP-CLIでVCCW環境をほいほい作る

Last updated at Posted at 2016-11-14

VCCWのサイトを立ち上げるには、公式サイトから.zipをダウンロードして、解凍してターミナルを開いてって感じで一手間ありますよね。

先日リリースしたWP-CLIコマンドをセットアップすれば以下のようにわずかなコマンドで新しいVCCW環境を作ることができます。

$ wp scaffold vccw wordpress.dev --lang=ja
$ cd wordpress.dev
$ vagrant up

インストール方法

以下のコマンドを実行してください。

$ wp package install vccw/scaffold-vccw:@stable

使用方法

任意のディレクトリに移動して以下のようにコマンドを実行してください。

$ wp scaffold vccw <ディレクトリ名>

以上で以下のような感じでVCCWの最新版がダウンロードされます。

├── .editorconfig
├── .gitignore
├── LICENSE
├── README.md
├── Vagrantfile
├── ansible.cfg
├── provision/
└── site.yml

あとは、そのディレクトリに移動して vagrant up するだけ。

必要に応じて site.yml を編集してください。

コマンドラインオプション

このコマンドにはいくつかのコマンドラインオプションがあります。

  • --host=<ホスト名> - ホスト名を指定してください。デフォルトは vccw.dev です。
  • --ip=<IP> - IPアドレスを指定してください。デフォルトは 192.168.33.10 です。
  • --lang=<language> - 言語を指定してください。デフォルトは en_US です。
  • --update - VCCWのファイルを最新版にアップデートします。

help

wp help scaffold vccw でヘルプを見ることができます。

NAME

  wp scaffold vccw

DESCRIPTION

  Generate a new VCCW environment. bHHHH

SYNOPSIS

  wp scaffold vccw <directory> [--host=<hostname>] [--ip=<ip-address>] [--lang=<language>]
  [--update]

OPTIONS

  <directory>
    The directory of the new VCCW based guest machine.

  [--host=<hostname>]
    Hostname of the guest machine. Default is `vccw.test`.

  [--ip=<ip-address>]
    IP address of the guest machine. Default is `192.168.33.10`.

  [--lang=<language>]
    Language of the WordPress. Default is `en_US`.

  [--update]
    Update files of the VCCW to latest version.

EXAMPLES

    $ wp scaffold vccw wordpress.dev
    Generating:   100% [===========================] 0:03 / 0:06
    Success: Generated.

    $ wp scaffold vccw wordpress.dev --lang=ja
    Generating:   100% [===========================] 0:03 / 0:06
    Success: Generated.
49
51
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
49
51