1为分类ID 亲测可用!
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
以上的SQL语句中,taxonomy_id = 1 后面的”1″是默认分类ID号,如果你的默认分类ID不是1,要更换成你自己的默认分类ID号。(相关知识:wordpress如何查看分类的ID号)
未经允许不得转载:表盘吧 » WordPress 清除未分类目录文章 SQL