登录
  • 欢迎访问 Sharezer Blog

WordPress 从 mysql 修改主页

Default sharezer 113次浏览 已收录 0个评论

主页保存在数据库wp_options表中

mysql> select * from wp_options where option_name="siteurl";
+-----------+-------------+--------------------------+----------+
| option_id | option_name | option_value             | autoload |
+-----------+-------------+--------------------------+----------+
|         1 | siteurl     | https://www.sharezer.com | yes      |
+-----------+-------------+--------------------------+----------+
1 row in set (0.00 sec)

mysql> select * from wp_options where option_name="home";
+-----------+-------------+--------------------------+----------+
| option_id | option_name | option_value             | autoload |
+-----------+-------------+--------------------------+----------+
|         2 | home        | https://www.sharezer.com | yes      |
+-----------+-------------+--------------------------+----------+
1 row in set (0.00 sec)

以下案例更新主页:

mysql> UPDATE wp_options SET option_value = 'http://192.168.1.207:7008' WHERE option_name = 'home';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> UPDATE wp_options SET option_value = 'http://192.168.1.207:7008' WHERE option_name = 'home';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1  Changed: 0  Warnings:

Sharezer , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明WordPress 从 mysql 修改主页
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址