How to Merge Categories in WordPress

Sometimes when working with WordPress you will have the need to merge two or more categories. Perhaps you have imported posts from another blog or have decided that you’d like to remove a category from your blog and place its posts under a different category.

While your first instinct may be to look for a plugin that merges categories, you might be surprised to learn that it can easily be done through the WordPress dashboard. Here’s a quick step-by-step guide for merging categories without using a plugin.

Step 1: Select all posts in the category you want to eliminate.

In the dashboard navigate to Posts >> All Posts. Filter the posts to show only the category that you want to eliminate, then select all.

If you have hundreds of posts that you need to merge, you may also need to change how many you can view at once on the page. You can do this by pulling down the “Screen Options” panel and changing the number of posts to show.

Step 2: With all posts checked, select “Edit” and click “Apply”.

You will now be presented with a bulk edit screen where you can select the new category to be applied to the posts. You also have some more specific options in there if you want to leaves some of the posts out or only re-categorize a few and then put the others in a different category.

Step 3: Eliminate the category you no longer need.

Once you’ve successfully added the new category to all of the posts, you can then eliminate the original category that you no longer want to use. Navigate to Posts >> Categories. Hover over the category you want to remove and then click the red delete button. I know it feels like you might be deleting posts, but if you’ve already moved them to other categories then you have nothing to worry about.

Congratulations – you’ve successfully merged categories without using a plugin! The only other thing I might note is that if you are concerned about SEO and have categories in your permalinks, then you may want to set up some redirects for the posts that have been moved. You should be able to do this automatically using a plugin like Redirect, but this is entirely optional.

Tags

Comments (5)

  1. Thanks for this short tutorial. Very useful!

    My only remaining question is, what if I have multiple categories assigned to posts. I import more posts from another blog that has one or more identical categories. WordPress renames the new, duplicate category by adding a, “-2″. So now I have category, and category-2.

    If I follow the directions, I can delete category-2 and assign category to the new posts, but all the other categories assigned to the posts are not the same. So I’m thinking that a bulk edit in this case won’t work.

    For example 2 posts have cats and cats-2 as a their category (after I imported the new post with the duplicate category of “cats”) and I need to merge the cats-2 with the cats category, but one post also has “animals” and the other has “kittens” as a category.

    If I try to edit both posts’ categories, won’t I be forced to assign the same categories to both posts now, even though one should only have cats and animals as its categories and the other should have cats and kittens as its categories?

    Thanks much if you can make any sense of my category blather!

Participate