• I have some loads of unused tags and wish to mass delete theme.
    How can you achieve that?
    MySQL query, would be fine.

    I have digged around and found no plugin, and justa a mySQL query sample that hangs the computer!

    Help wanted!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Blutarsky

    (@blutarsky)

    this is the select statment that hangs…

    SELECT * FROM wp_terms wt
    INNER JOIN wp_term_taxonomy wtt ON wt.term_id=wtt.term_id
    INNER JOIN wp_term_relationships wtr ON wtr.term_taxonomy_id=wtt.term_taxonomy_id
    LEFT JOIN wp_posts wp ON wp.ID=wtr.object_id
    WHERE
    taxonomy='post_tag'
    AND ID IS NULL
    AND NOT EXISTS(SELECT * FROM wp_terms wt2
                    INNER JOIN wp_term_taxonomy wtt2 ON wt2.term_id=wtt2.term_id WHERE wtt2.parent=wt.term_id)
    
    ORDER BY name

    Help!

    Thread Starter Blutarsky

    (@blutarsky)

    Anyone has the same problem as me?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mass delete unused tags & relationships’ is closed to new replies.