WordPressを簡単にインストールするためのスクリプトです。 WP-CLIでWordPressの初期設定をする際のコマンドをまとめています。 データベース設定などの情報を.envファイルに書いておきwphereを実行すればWordPressのインストールが完了します。
- wphereをダウンロードします。
ex.)
git clone https://github.com/yousan/wphere.git ~/git/
- ドキュメントルートとなるディレクトリを作成します。
ex.)
mkdir ~/public_html/example.com
- .env.sampleを.envとしてコピーしてきます。
ex.)
cp ~/git/wphere/.env.sample ~/public_html/example.com/.env
- .envファイルを編集します。
- wphereを実行します。
ex.)
~/git/wphere/wphere
WP-CLI 0.24 以上をインストールしてください。
Download and install WordPress into current directory.
wp core download
wp core config
wp core install
- Download wphere
- Create a document root directory such as public_html/example.dev
- Copy and rename .env.sample to .env
- Write DB informations to .env
- Call wphere
$ git clone https://github.com/yousan/wphere.git
$ mv wphere/wphere ~/sh/
$ chmod +x ~/sh/wpehre
$ mkdir ~/public_html/example.dev
$ cd ~/public_html/example.dev/
$ cp ~/git/wphere/.env.sample ./.env
$ vi .env
$ wphere
- WP-CLI