解决WordPress日志ID不连续的方法
今天查看了下博客的数据库,发现日志不连续的问题很严重,我的日志ID数已经好几百了,而实际日志不到一百,看着很不舒服,上网查了一下,发现到处都是以下四句代码,一个一个改还真是麻烦,最终还是放弃了。
将ID重新设置为连续,需要执行以下4条语句(以将ID59改为ID58为例):
update wp_posts set id = 58 where id = 59;
update wp_term_relationships set object_id = 58 where object_id = 59;
update wp_postmeta set post_id = 58 where post_id = 59;
update wp_comments set comment_post_ID = 58 where comment_post_ID = 59;
自从取消了自动保存功能和历史修订版本功能,总算是比以前好多了,暂且就这样吧。
COMMENTS