Refactoring Tags in WordPress BlogSolution ·
I did refactor the tags of my blog this week end!
I display the tags (as a word cloud) on the right-hand side of my pages. The tags grew organically since I started blogging in 2010.
As with many things that grow organically, it got out of hand with time. First the technological space I covered in 2010 isn’t the same today but also, I did tend to add very specific tag (e.g. DocumentDB) and with time I ended up with over 60 tags.
With hundreds of blogs and 60 tags, the WordPress portal (I use WordPress.com for my blog) wasn’t ideal to start doing changes.
So I got my WordPress API .NET SDK out of the mothball I also updated my “portal” (deployed on Azure App Services) to that SDK. This is probably one of the worst example of an ASP.NET MVC application but surely the ugliest site available out there. It’s functional, that’s what I can say
In case you want to do something similar on your blog, here is how I did it.
First I define target tags. I did that by looking at the current list of tags but mostly I just gave myself a direction, i.e. the level of tags I wanted.
I then iterated on the following:
- Look at the tags in WordPress portal, find targets for rename
- Used the “Change Post Tags” functionality to change tags “en masse” on all the posts
- Alternatively I used the “Edit Post Tags” functionality to edit the tags in Excel
- Then use the “Clean up Tags” to remove tags that had no longer any posts associated to it
BTW, each of those functionalities tells you what they are going to do to your posts and ask for your consent before doing it.
After a couple of iterations I got the bulk of my tags cleaned up.
The last thing I did was to define the tags, i.e. add descriptions. I did that within the WordPress portal.
Hopefully that should make my posts easier to search!