まずはwockerを正常に動くようにセットアップ済みであることを確認。
インストール手順は→を参照:http://wckr.github.io/
1:vagrantcloud.comのアカウントを作成

2:agrant loginコマンドで(1)で作ったアカウントを登録
vagrant login
In a moment we will ask for your username and password to HashiCorp's
Atlas. After authenticating, we will store an access token locally on
disk. Your login details will be transmitted over a secure connection, and
are never stored on disk locally.
If you do not have an Atlas account, sign up at
Atlas Username: [1で作成したID]
Password (will be hidden):[1で作成したPWを入力(画面に表示されません。)]
You are now logged in.“You are now logged in.” と表示されればOK!
3:wockerをインストールしたフォルダにあるVagrantfileにポートフォワード設定を追加
変更は以下を確認してください。
4:Macのファイアウォールを変更

ファイアーウォール有効になっている場合はシステム環境設定→ファイアウォールの設定を変更
(ファイアウォールが無効の方は5.へ読み進めてください。


5:wockerを起動(リロード)
wockerが動いている場合は、
vagrant reload動いていない場合は
vagrant startしてから
vagrant ssh
wocker start [動かしたいWPのコンテナー名]でwocker内のWPを動かします。
6:Dynamic Hostnameプラグインのインストール
WordPress上のURLが”http://wocker.dev/〜”になって外部がらアクセスした時に画像やCSSが出ないので
wocker内のWordPressにDynamic Hostnameプラグインをインストール&有効化します。
wockerの場合だとvagrant sshをしている状態で以下のコマンドを実行
$wocker wp plugin install dynamic-hostname --activate7:vagrant shareを実行
exitしてvagrant sshから抜け出してMacのコンソールに戻って(exitせずにターミナルで別タブを立ち上げてwokerのカレントディレクトリに移動して実行してもOKです。)
$ vagrant share
==> wocker: Detecting network information for machine...
wocker: Local machine address: 10.0.23.16
wocker: Local HTTP port: 80
wocker: Local HTTPS port: disabled
==> wocker: Checking authentication and authorization...
==> wocker: Creating Vagrant Share session...
wocker: Share will be at: ghastly-marten-5741
==> wocker: Your Vagrant Share is running! Name: ghastly-marten-5741
==> wocker: URL: http://xxxxxx-nnnnnnn.vagrantshare.com表示された”wocker: URL: http://xxxxxx-nnnnnnn.vagrantshare.com”で外部からもwockerのサイトが表示されます。
終了するときは、
control + c


