wordpress删除标题重复文章SQL

小飞同学找来的一条删除WordPress标题重复文章的SQL,挺管用的,摘过来收藏备份。

create table my_tmp as select min(ID) as col1 from wp_posts group by post_title;
delete from wp_posts where ID not in (select col1 from my_tmp);
drop table my_tmp;

Categories: 技术爱好

2 Comments

Leave a Comment