如何批量删除wordpress 指定分类目录下的所有文章
SQL如下
删除指定分类的文章
复制
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 = 18(分类ID)
删除分类
复制
delete FROM `wp_term_relationships` where term_taxonomy_id = 18(分类ID)
转载请注明:范耀祖 » 如何通过sql批量删除wordpress 指定分类目录下的所有文章