Centos7 builds wordpress, a simple tutorial

1. install wordpress on centos

1.1. lnmp installation

lnmp install

wget -c http://soft.vpser.net/lnmp/lnmp1.4.tar.gz && tar zxf lnmp1.4.tar.gz && cd lnmp1.4 && ./install.sh lnmp

mysql uses the default version, because the server configuration has only 1G memory, you cannot install 5.6 and above, you can only install 5.5
and then enter the mysql database password, all the way to the default

1.2. Download wordpress

wget https://cn.wordpress.org/wordpress-4.9.4-zh_CN.tar.gz

1.3. Install wordpress configuration

tar -xvf wordpress-4.9.4-zh_CN.tar.gz
mv -f wordpress /home/wwwroot/default/
mv -f /home/wwwroot/default/phpmyadmin /home/wwwroot/default/wordpress
cd /home/wwwroot/default/wordpress
cp wp-config-sample.php  wp-config.php
sudo vim wp-config.php

Use phpmyadmin to create a database, browser input

http://119.123.123.123/phpmyadmin # 新建数据库名为wordpress,名字自己随意写……,后面要用到。

Enter the directory to modify the database name, password, etc.

define('DB_NAME', 'wordpress');

/** MySQL数据库用户名 */
define('DB_USER', 'root');

/** MySQL数据库密码 */
define('DB_PASSWORD', '你的密码');

/** MySQL主机 */
define('DB_HOST', 'localhost');

/** 创建数据表时默认的文字编码 */
define('DB_CHARSET', 'utf8');

/** 数据库整理类型。如不确定请勿更改 */
define('DB_COLLATE', '');

sudo find / -name nginx.conf

Enter the file and modify it to
root /home/wwwroot/default/wordpress;

Restart nginx
sudo service nginx restart

Enter your ip address in the browser and enter it directly, configure the wordpress login password and so on...

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324751585&siteId=291194637