解决WordPress日志ID不连续的方法
删除是Post Revisions垃圾信息,请执行:
delete from wp_posts where post_type = 'revision';
将ID重新设置为连续,这个比较麻烦,设置一个ID就要4条SQL语句,我仅仅举一个例子,将ID为88的文章修改为ID为86,需要执行以下语句。
update wp_posts set id = 86 where id = 88;
update wp_term_relationships set object_id = 86 where object_id = 88;
update wp_postmeta set post_id = 86 where post_id = 88;
update wp_comments set comment_post_ID = 86 where comment_post_ID = 88;
参考月光博客:http://www.williamlong.info/archives/1491.html
个人在用一个叫Revision Control的插件,个人感觉可以基本上完全解决Revision的问题,十分推荐使用。
最新评论