修改wordpress文章id

通过数据库SQL窗口运行代码进行修改。如你现在发布的文章链接的id是2259的,要把id改成1。可进入phpmyadmin,点击wordpress安装的数据库,再点击sql查询窗口,运行如下代码即可:

update wp_posts set id = 1 where id = 2259;
update wp_posts set post_parent = 1 where post_parent = 2259;
update wp_term_relationships set object_id = 1 where object_id = 2259;
update wp_postmeta set post_id = 1 where post_id = 2259;
update wp_comments set comment_post_ID = 1 where comment_post_ID = 2259;

上面代码的“1”是修改后的id,2259是修改前的id,当然你也可以把1改其它数字、字母等。如果你文章的链接已经被搜索引擎收录了,建议不要大量修改。

© 版权声明
THE END
喜欢就支持以下吧
点赞0
分享
评论 抢沙发
  • 昵称

  • 取消

    请填写用户信息: