本文提供的方法是直接操作数据库,请谨慎操作,做好备份!

对于造成的数据损失,本文不承担任何责任!

一次性全部清空文章和分类

1
2
3
4
5
6
delete from wp_posts where ID >= 1;
delete from wp_postmeta where meta_id >= 1;
delete from wp_term_relationships where object_id >= 1;
delete from wp_term_taxonomy where term_id >= 1;
delete from wp_terms where term_id >= 1;
delete from wp_termmeta where meta_id >= 1;

清空回收站语句

1
delete from wp_posts where post_status="trash";

清空草稿语句

1
delete from wp_posts where post_status="draft";