WordPress批量删除未引用(无用)的TAG标签

  开发

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
    );

LEAVE A COMMENT

Captcha Code