Bulk delete unused tags from WordPress – You know guys, deleting unused tags from WordPress website will be hectic sometimes if you don’t do it on time. But, who is taking tension of this? Do you? I don’t. We have some set of plugins which can perform this tag deletion action in a while. In this article, we will discuss both the manual and plugin deletion of unused tags on a WordPress website.
While writing a blog post and even when we perform SEO on our website, we create a lot of tags. Some of them left unused and this number will grow day by day. If you don’t delete them.
You know in the last post I have discussed how have I deleted 14k subscribers from my website? Most of them were spam subscribers. But, as a bit of luck, I don’t have any spam tags or tags created by those spam users.
So, why am I worried about unused tags? Yes, because they are very high in number. I have deleted almost 100’s of posts from my website in last 1 and half year but the tags I have created is still there. Not only these tags, while writing posts I have created a lot of tags and later I deleted them from the post edit page finding they are irrelevant to the content later. But those tags are still active in the tags directory.
How a tag becomes unused?
There might a lot of reasons for this. I am mentioning the reason which has I known and observed. If you found something else you can comment about that.
- Deleted posts and pages left tags behind
- Tags created and deleted from the post edit page, Not from the tag directory or database
- You type some tags and you pressed enter, means tags saved in tags directory but in the meantime you realized some spelling mistakes and deleted that tag from there. But it is still in the tags directory.
So, deleting these unused tags are very much important with respect to website SEO.
Mass deletion of unused tags can be performed either manually or by using some plugins. let’ see the manual process first.
Method 1 – Manual deletion of unused tags
Follow the steps provided below to delete a tag manually from tag directory.
Note: You might need to redirect an unused tag to some other URL after deletion. But, performing redirection in bulk is also not suggestable. So, better you deleted it. but it completely your choice. I have redirected some of my important tags to my main URL or the post URL because I have also submitted tags in the Google Search Console.
Here we go with the steps –
- Login to your WordPress dashboard
- Navigate to Posts->Tags
- Now see the count of tags. if the count is zero then that tag is not used anywhere on your website.
- Select tags having zero count
- Choose delete option in Bulk Actions
- Click Apply to delete them
- You can perform redirection according to your choice after then
Deleted tag redirection is good for SEO
You know you can choose not to redirect your tags to another content. But, a good SEO expert will never suggest you this. There will be some situations in which you have to perform redirections. So basically, if you have any relevant post then redirect the deleted tag to them or else just redirect them to your homepage.
If your website is new or in the case you have deleted the post. better option for you will be homepage redirection or leave it blank.
Note: It may increase 404 page not found issues for some time. If you get so, submit your tag in google search console again.
There is a step where people stuck. They have asked “Sir, I don’t have count option in my tag section, how do I get that?”
The answer is very simple. Just click on “Screen options” button. You can find it in the top right corner. Now check the count option and click save.
You are done here. Smile please 🙂 Say, cheese!
Method 2 – Deleting unused tag using a plugin
As you came to know manual deletion of tags is time-consuming and need some effort as well. Which I know you don’t want to give? So, You can perform this deletion process within minutes using some plugins. Let’s see how it goes?
There are very few numbers of plugins available for tags deletion. the plugin which I am going to use right now is ‘Mass delete unused tags’
I will not recommend this plugin now. it is not tested with
- Create a complete backup of your website
- Now download and install the Mass delete
plugin, you can download it from WordPress store as well.
- Select the ‘Yes, delete all unused terms’ option and hit the Delete Terms button.
- Don’t refresh your browser tab or window till all the unused tags are deleted. Mass Delete Unused Tags plugin deletes 50 tags at a time to avoid database crashes.
This is also a prime method used by core programmers. If you don’t have much knowledge of database then make sure to take a complete backup before trying this code.
This sql operation can be performed in phpMyAdmin.
Tag deletion Code
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);
If you have any query or suggestion feel free to comment below.
How useful was this post?
Click on a star to rate it!
Average rating / 5. Vote count:
No votes so far! Be the first to rate this post.
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!