乖,下次别改了
在后台的设置里,WordPress地址(URL)是不能随便更改的,只有站点地址(URL)可以随意动。如果更改了WordPress地址(URL),主页面可能就丢失了。
解决方法
登录到服务器的mysql中改回来
- 用Xshell或宝塔登录Linux终端
- 登录mysql
mysql -u账号 -p密码 show databases;
use 你的数据库名
show tables;
后续操作如下:
mysql> select * from wp_options limit 1;
+-----------+-------------+--------------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+-------------+--------------------------+----------+
| 1 | siteurl | https://www.zdbya.com/wp | yes |
+-----------+-------------+--------------------------+----------+
1 row in set (0.00 sec)
mysql> UPDATE wp_options SET option_value="https://www.zdbya.com" WHERE option_name="siteurl";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from wp_options limit 1;
+-----------+-------------+-----------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+-------------+-----------------------+----------+
| 1 | siteurl | https://www.zdbya.com | yes |
+-----------+-------------+-----------------------+----------+
1 row in set (0.00 sec)
参考博客
https://blog.youkuaiyun.com/W_Wstill/article/details/120393792