WordPress清空所有文章数据

 

进入数据库,执行以下语句

delete
from
wp_posts
using
wp_posts,
wp_term_relationships,
wp_term_taxonomy
where
wp_posts.id=wp_term_relationships.object_id
and
wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
and
wp_term_relationships.term_taxonomy_id = 1

注:id = 1 这个id是分类下的所有文章,如果你博客有多个分类全部都想删除文章,那么只需要把全部分类删除即可,删除后留下默认分类,查看默认分类id多少对应输入即可,默认ID是1.

评论抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址