1
1

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 5 years have passed since last update.

CentOS7 WordPress Nignx

Last updated at Posted at 2018-09-18

前提

以下をインストール済み

項目 Version
MySQL 5.7
Nginx 1.10.2
PHP 7.1.10

yumのアップデート


$ yum update

WordPress用にMySQLのユーザーを追加する

MySQLにログイン


# mysql -u root -p

MySQLでユーザーを追加


mysql> CREATE DATABASE wp;
mysql> GRANT ALL PRIVILEGES ON wp.* to wp@localhost identified by 'パスワード'
mysql>  flush privileges;

WordPressのインストール


# wget https://ja.wordpress.org/latest-ja.tar.gz

解凍する


# tar xvzf latest-ja.tar.gz

wordpressディレクトリを指定のディレクトリへ移動


# mv wordpress /var/www/html

WordPress 設定ファイルを編集


# cd /var/www/html/wordpress
# cp wp-config-sample.php wp-config.php
# vim wp-config.php

wp-config.php
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');
/* ここにデータベース名 */

/** MySQL database username */
define('DB_USER', 'username_here');

/* ここにユーザー名 */

/** MySQL database password */
define('DB_PASSWORD', 'password_here');
/* ここにパスワード */

/** MySQL hostname */
define('DB_HOST', 'localhost');
/* ここにDBのホストを */

1
1
1

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?