How to Mass Delete Unused Tags in WordPress

Published On :

Bloggers often come across the word spam and we have already covered a list of plugins to prevent spam comments. But what about registered users who create awful number of tags and never return back or use it in their posts ?

Sometimes even we create tags which remain unused in our blog posts. Do we have the time daily/weekly to check for such tags and delete them one by one ?

I’ll take up my own example here. A year and some months ago I had opened up DailyBlogging for guest posting just to realize an year later that it was a big mistake. Not the guest posting part but the user registration one. Yes, I had blindly ticked the ‘Anyone can register’ option in the WordPress Settings page.

No Captcha, email verification, nothing. After few months I checked the contributors list and found that there were 500+ users. The number of posts submitted for review by these spam users were above 1000 in number.

The first step was to turn off  user registrations. After that I decided to do a mass clean up and manually started deleting the posts and users. But at that time it didn’t strike me that there would be so many unused post tags.

Remove Unused tags with ‘Mass Delete Unused Tags’ Plugin

Delete Unused WordPress Tags

Mass Delete Unused Tags WordPress Plugin

The next step was to remove those unused tags and ‘Mass Delete Unused Tags’ plugin did that in minutes. Check the detailed tutorial below.

  1. Take a full database backup (either use the WP DB Backup plugin or from the host panel itself).
  2. Download and Install Mass Delete Unused Tags plugin from your WordPress dashboard.
  3. Select the ‘Yes, delete all unused terms’ option and hit the Delete Terms button.
  4. Don’t refresh your browser tab or window till all the unused post tags are deleted. Mass Delete Unused Tags plugin deletes 50 tags at a time to avoid database crashes.

 

Delete Unused WordPress Tags [SQL Query]

Below is a small but powerful SQL query (from Sumtips) which will delete all the unused tags from your WordPress database.

DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE count = 0 );
DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy);

Remember I haven’t tried the SQL method, so use it with caution and after taking a complete database backup of your WordPress blog. Hope this tutorial helped you in removing plenty of unused WordPress tags created by spammers.

Have you faced such a problem before on your blog ? If yes, did you try any other plugin or manually deleted those tags ??

Share :
Tagged as : 7 Comments
About » Has written 231 Post(s) «

I'm a Web Designer/Developer, SEO'er and a Blogger who gives a few Blogging Tips in the form of posts/tutorials. Follow & Subscribe to my Blog if you feel it's worth it.

HostGator
Loader

7 Comments Comments RSS

  1. #

    vow,that great.I never knew that we could mass delete unused tags.Thanks for this info

  2. #

    Thanks for query

  3. #

    I didn’t know it was actually possible to mass delete unused tags. Thanks. I will be downloading the plugin now.

  4. #

    Thanks for the step by step guidance for deleting the unused tags in wordpress, it helps me a lot..

  5. Chuck
    #

    Hi guys,

    I’m sorry this is off-topic, but I haven’t been able to find any info on this.

    Can anyone shed any light on discountwpthemes.com? The site seems to be legit, but I’ve never used it and am a little nervous about giving out my info.

    Thanks for any help anyone can offer

    CT

  6. #

    Thanks man,nice!

  7. #

    Thanks for the information; I’ll visit the site again to get update information

Post a Comment

Your email is never published nor shared. Required fields are marked *

Also, use your Real name in the 'Name' field. Comment names with only keywords will be trashed.