Last active
May 5, 2024 22:16
-
-
Save jb510/30dd61ad8d25476907dcb164ba4a1e24 to your computer and use it in GitHub Desktop.
Delete WordPress tags MySQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE count = 0 ); | |
DELETE FROM wp_term_taxonomy WHERE term_id not IN (SELECT term_id FROM wp_terms); | |
DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment