1

I have some aging Wordpress blogs where I made the mistake of creating way too many categories (50+ in some instances). This was, in part, due to the fact that tagging was not yet available in Wordpress.

I'd like now to condense the categories and implement tags. The problem is, I don't want to break indexed links.

What strategy and perhaps plug-ins could I consider to do this? Ideally, the category listing pages would permanently re-direct to the appropriate tags, which I would set. I've also got to deal with the problem of people who pull feeds directly from categories.

Should I just chalk these few sites up to a learning experience and leave them alone, or is there a way for me to make this correction so late in the game?

2 Answers 2

3

Under your site's Tools > Import menu there is a plugin you can install called Categories and Tags Converter, which once installed will give you control over how to handle categories you might want to convert.

This is a relatively painless process in the 3 times I've used it, but I never concerned myself with migrating older urls. If that's a concern, and the "slugs" for category are the same, and you're running under Apache, some .htaccess directives for the individual categories should do the trick. So, assuming you have urls like:

http://example.com/archive/category/foo
http://example.com/archive/category/bar

And want to change them to:

http://example.com/archive/tag/foo
http://example.com/archive/tag/bar

You would add directives for each one in your .htaccess file, like so:

Redirect permanent /archive/category/bar http://example.com/archive/tag/bar
Redirect permanent /archive/category/foo http://example.com/archive/tag/foo

Now, that presumes that you want them redirected, and none of your blog authors are going to be adding those categories back!

But generally, this would be the approach that would work.

If you're at all concerned with losing data when you alter content, BACK UP YOUR MYSQL DATABASE. Sorry, I had to yell that. :-) And if it goes haywire then simply restore your database.

If you have linked to those old urls in your content, they'll redirect fine. But you could also run WordPress Search and Replace plugin, which facilitates a migration like that, but again, mind backups especially with the Search and Replace plugin, since it makes its changes with no backup.

1
  • Outstanding and comprehensive answer, and I appreciate yelling where backups are concerned! :) What eludes me is how I missed that plugin.
    – Tim Post
    Jul 13, 2010 at 17:55
0

WordPress offers an option to convert selected tags to categories, and vise versa. I think it's been done in a way to ensure that no links are broken - redirects are put in place as needed.

2
  • I may just be snow blind, but did not see such an option?
    – Tim Post
    Jul 13, 2010 at 2:58
  • Log into your WP admin, and click into the categories view, listed under Posts. There should be a link leading to the category/tag converter. Jul 13, 2010 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.