SQL语句一键删除wordpress某一分类下所有文章

最后一句的id = 26及分类ID为26,看不到分类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 = 26

发表评论

电子邮件地址不会被公开。 必填项已用*标注