参考网站:
[root@localhost ~]# tar xf wordpress-5.0.3-zh_CN.tar.gz -C /usr/local/nginx/html/
将 wordpress 软件整体解压到 nginx 根目录
mysql> CREATE DATABASE wordpress; # 创建wordpress库
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO "wordpress"@"localhost"
-> IDENTIFIED BY "wordpress"; # 给wordpress授权并且设置密码
Query OK, 0 rows affected (0.02 sec)
mysql> FLUSH PRIVILEGES;
#刷新权限
Query OK, 0 rows affected (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| wordpress |
+--------------------+
4 rows in set (0.02 sec)
mysql> exit
Bye
之后可直接打开 Web 服务进行安装:
http://192.168.1.5/wordpress/wp-admin/setup-config.php
下一步
下一步 提示报错,手动创建,将框内的配置信息粘贴到 PHP 文件中
[root@localhost ~]# vim /usr/local/nginx/html/wordpress/wp-config.php
下一步
如下便是安装成功
最后直接访问即可,自定义设置个性化内容