宝塔Linux部署WordPress404报错

遇到的问题

1.在宝塔的软件商店中一键部署 WordPress 后显示数据库名重复,之后将数据库删除后重新部署显示正常。

2.点击默认的IP地址(域名/index.php)后,网页显示红色 404 报错:
nginx error! The page you are looking for is not found.

尝试更改网页中的伪静态,仍然报错,更改 php 版本为 7.3,仍然报错,

之后重启 nginx

3.重启nginx 报错:
使用service nginx restart 重启 nginx 报错如下:

nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
复制代码

解决:
在服务器中输入:
sudo nginx -s stop

再重新输入:
service nginx restart

启动成功!

e7c46cb927a4c3cce6b43d2b6c2b670.png