DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

Using the “Categories to Tags” tool, WordPress allows you to easily turn categories into tags. But if you have lots of categories to convert, this will take a while. Here is a simple SQL query that will turn all your categories into tags in a second.

Just run the following query on your WordPress database, and all categories will be turned into tags. Don’t forget to replace the table prefix wp_ if your database is using another prefix.
And of course, do not forget to make a backup of your database before running the query!

UPDATE wp_term_taxonomy SET taxonomy='post_tag', parent=0 WHERE taxonomy='category';

Thanks to Go WordPress for the tip!


One Comment

  1. Will this also work for other taxonomies? For example, my posts use a custom field called “name” and I want to convert all these custom fields to a new non-hierarchy taxonomy called “software”. Do you know how I would modify this?

Leave a Comment

Your email address will not be published. Required fields are marked *