If you have been using WordPress for a while, you may notice that you have some Post Tags that could have gone unused or removed from posts as you edit them. Instead of looking through each post tag to determine which are assigned and which arent, just run this Query to remove the unused post tags and then enjoy a nice hot cup of Joe!
[SQL]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);[/sql]
One comment
Pingback: Tech Reviews For June 26, 2012 - The SSD Review