去除wordpress网站链接中wordpress字样

 时间:2024-10-12 08:06:28

1、先来看下,wordpress安装完后访问情况,即进入网站首页需要通过完整链接http://localhost/wordpress/

去除wordpress网站链接中wordpress字样

3、去除Include conf/extra/httpd-vhosts.conf 前的【#】

去除wordpress网站链接中wordpress字样

5、接下来我们编辑打开httpd-vhosts.conf文件

去除wordpress网站链接中wordpress字样

7、我们可以看到http://localhost/wordpress/已无法访问,http://localhost/可直接打开网站。

去除wordpress网站链接中wordpress字样

8、但这个时候事情还没完,因为有很多链接的路径还是指向的原来带wordpress的,需要统一调整,不然会出现找不到页面。

去除wordpress网站链接中wordpress字样

9、wordpress很多链接URL存在了数据库里,烂瘀佐栾这里需要替换下数据库的几张表,我为大家把sql放这里,根据自己的情况愉桴狁焕进行更新替换。可以先查询下自己这几张表里对应字段的值,然后就是将wordpress去除掉。因为咱们上边的操作使得在访问时localhost就代表了localhost/wordpress,所以要删一下。找到wordpress数据库,执行如下sqlUPDATE wp_options SET option_value = replace(option_value, 'http://localhost/wordpress', 'http://localhost');UPDATE wp_posts SET guid = REPLACE(guid, 'http://localhost/wordpress', 'http://localhost');UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://localhost/wordpress', 'http://localhost');关于这块的调整具体步骤可以参考我的其他百度经验

  • XP系统如何查看445端口是否关闭
  • Windows11如何创建网络
  • win7MySQL或sqlserver无法连接到本地数据库
  • 如何使用plsql developer连接数据库创建触发器
  • win10电脑怎么重置文件夹视图?
  • 热门搜索
    b股是什么 动漫制作需要学什么 什么叫情人 偷什么东西不犯法 dwg是什么格式 小年是什么时候 温碧泉适合什么年龄 维生素e油 绣春刀是什么刀 xd股票什么意思