1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

GitHub CodespacesでWordPress開発を始める

Last updated at Posted at 2023-09-24

Create codespaceを押す
image.png

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

image.png

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.phpwp-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をインストール

image.png

引用

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?