Convert WordPress Categories to Tags
Posted on June 28, 2009
Filed Under General | 2 Comments
Categories to Tags to Categories
Have you ever been in a position where you come to expect certain things to be done certain ways only to discover that your expectations were the real limitation in getting something done? Confusing? It can be. This happens many times where I approach a project following a pretty standard protocol when working with database related projects. In nearly 95% of those situations, needing to make a bulk database edit in any web based project I usually start with phpMyAdmin and after a few SQL strings or possibly a bulk find and replace I can achieve what I’m after. I call this kind of work “grunt work” because its laborious and repetitive and I usually assign it to my brother who specializes in data conversions and migrations. Recently I found myself facing this task when asked to first import blogger posts into WordPress 2.8 and then perform a bulk update by replacing all of his <div class="articletitle"> instances with <h1>. Why exactly the titles of the posts were wrapped in the DIV tags I’m not sure but the challenge was how to do this with the simultaneous replacement of the proper H1 closing tags as not to alter any other possible DIV instances. PHP comes into play at that point with the string replace which worked fine. Having exported the SQL to a CSV file and saving it to the server, the process took barley 5 minutes. The WordPress Tags were next on the clients list and at first I figured that Id need to script something a bit more involved to achieve this. This is where my initial misplaced expectation had been placed because I knew that it would take some time and I really didn’t want to start my day with the task.
The real challenge in my mind was how to convert all those dozens and dozens of WordPress Categories that were imported from Blogger into their proper or should I say desired “tag” for a better structure of the blogs overall functionality. Not really wanting to script anything, knowing that it would take a bit of time, luckily I remembered seeing but never using a clever little feature in an older install of WordPress that makes this process pretty straight forward and simple. So simple in fact that its barely worthy of a blog post, but I’ll call it a WordPress Tip because I’m sure someone out there must be curious how to do this. The process goes like this;
- Always make a backup of your database. Always!
- Next, navigate to your WordPress admin panel.
- Then, navigate to Posts >> Categories and at the very bottom on the right you will see “Categories can be selectively converted to tags using the category to tag converter..
- Simply select the categories you wish to convert and run the process.
Painless, fast and effective, once the conversion is verified you can now take advantage of this excellent feature by using TAGS in all of your posts.
Comments
Leave a Comment
If you would like to make a comment, please fill out the form below.
Shopping Cart
Recently
- WPRealty Features Short Code
- WordPress Approves ORPRESS
- I am taking a break from freelance
- OpenRealty Paid Support
- XML Feed Templates Download
- OpenRealty Data Icon Tutorial
- OpenRealty 2.5.8 Is Serious Competition
- OpenRealty Theme Options Addon
- WPRealty Sites Out Rank Competition
- Download WP Realty
Categories
- Adobe Dreamweaver
- Announcements
- Code Snippets
- Design
- General
- Joomla CMS
- Open Realty
- Open Realty Tips
- Portfolio
- Products
- Products in Review
- Professionals In Review
- Real Estate News
- Real Estate Websites
- Technical Resources
- Template Design Kit
- Week in Review
- WordPress Wisdom
Archives
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007

Jared you saved my ass! I found this post today in google thankfully. I thought i was going to have to do the same thing you mentioned except im not a coder so i would have to manually edit the db. Happy you posted this, seriously.
How can i send you a paypal donation?
Rick
Hey Rick, glad it helped, no need for PayPal donation on my blog posts but I do thank you for the offer.
You could donate to any number of the plugins or addons I publish http://wordpress.org/extend/plugins/profile/php4ever or any of those published at UltimateIDX. I think we are up to 33 FREE plug-ins and add-ons now.
Anyway glad you stopped by.