mysqliのインストール
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_mysqli.gh-codespaces.sh | bash
必要なら追加でモジュールをインストール
# exif
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_exif.gh-codespaces.sh | bash
# imagick
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_imagick.gh-codespaces.sh | bash
# zip
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_zip.gh-codespaces.sh | bash
# gd
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_gd.gh-codespaces.sh | bash
# intl
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_intl.gh-codespaces.sh | bash
MySQLのインストール
sudo apt update \
&& sudo apt install -y mysql-server \
&& sudo service mysql start \
&& sudo service --status-all \
&& echo "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''" | sudo mysql \
&& echo 'CREATE DATABASE wordpress' | sudo mysql
リバースプロキシの設定をwp-load.php
とwp-settings.php
の先頭に追加する
https://ja.wordpress.org/support/article/faq-installation/#リバースプロキシを使用している場合には-wordpress-をど
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
}
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
サーバーを起動
php -S localhost:8000
WordPressをインストール
引用