LoginSignup
2
0

More than 1 year has passed since last update.

CentOS7.9 にWordpress5.8を導入する

Last updated at Posted at 2021-11-25

はじめに

Wordpress環境を作成しなければならない機会がありましたので、手順メモ!

環境

  • CentOS 7.9
  • Apache 2.4
  • PHP 7.4
  • MariaDb 10.6
  • Wordpress 5.8

前提(以下が実施されていること)

Wordpress導入

Wordpressダウンロード、解凍

# cd /var/www
# wget https://ja.wordpress.org/latest-ja.tar.gz
# tar -zxvf latest-ja.tar.gz -C /var/www/

権限の変更
※ここあたりをやっておかないと、プラグインの導入時にFTPホスト等を聞いてくる

# cd /var/www/
# chown -R apache:apache wordpress

ドキュメントルート変更

# vi /etc/httpd/conf/httpd.conf

DocumentRoot "/var/www/wordpress"
<Directory "/var/www/wordpress">
    AllowOverride All
    # Allow open access:
    Require all granted
</Directory>

設定変更を反映する為にサービス再起動

# systemctl restart httpd

Wordpress設定
※リモートからであればIP又はドメインに置き換え
https://localhost/

1.png
2021-11-23-16-02-02.png
パラメータはDb作成時のものに揃えます
2021-11-23-16-02-19.png

上記が出た場合は、画面の指示に沿って設定
wordpressフォルダの所有者の変更を実施していれば出ないはず!

# cd /var/www/wordpress/
# vi wp-config.php

2021-11-23-16-14-17.png
ユーザ名等は任意に決めます

管理ページへログイン
※リモートからであればIP又はドメインに置き換え
http://localhost/wp-admin/
2.png

これで完了です!!

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