LoginSignup
1
1

More than 5 years have passed since last update.

wordpressをローカル環境に設定を行う

Last updated at Posted at 2017-01-29

    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


    export DB_NAME='wpdev'
    export DB_USER='root'
    export DB_PASS=''
    export DB_HOST='127.0.0.1'
    export PORT='8080'

    wp --info
    wp core download --locale=ja

    wp core config \
    --dbhost="$DB_HOST" \
    --dbname="$DB_NAME" \
    --dbuser="$DB_USER" \
    --dbpass="$DB_PASS"

    wp core install \
    --url=http://127.0.0.1:$PORT \
    --title="WordPress" \
    --admin_user="admin" \
    --admin_password="admin" \
    --admin_email="admin@example.com"

    open http://127.0.0.1:$PORT
    wp server --host=0.0.0.0 --port=$PORT

wp-cliの機能のみでwordpressのインストール、設定ファイルの記述、dbの作成や初期ユーザーの作成、ビルトインサーバーを使用してのサーバー立ち上げが可能です

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