wordpress 删除数据库所有文章和删除所有标签sql语句

秋知德雨个人 2023-3-12 1,068 3/12

删除所有文章

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 

删除所有标签

DELETE a,b,c
FROM wp_terms AS a
LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
LEFT JOIN wp_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_id
WHERE c.taxonomy = 'post_tag' AND c.count = 0

 

- THE END -
Tag:

秋知德雨个人

3月12日21:03

最后修改:2023年3月12日
2

非特殊说明,本博所有文章均为博主原创。

共有 1 条评论

  1. 九三

    666