How to Change the Category for Multiple Blog Posts With WordPress

A problem that many bloggers face is managing the categories for their blog.  It can be difficult to define a list of categories when a blog is started.  Even when you do, often times a blog will evolve over time and cover more and more different categories.  Eventually you can end up with the problem of too many categories, and decide you want to make some changes.

Janet from Biker Chick News asks:

I would like to re-categorize nearly five years of posts on one blog, and two years’ worth on another. What is the most efficient way to do this without having to open every post, click/unclick cats, and re-save?

Fortunately there is a simple answer.  Well, two simple answers, depending on your situation.

If you just want to change one category to another you can simple rename the category.  However if you want to collapse several different categories into one single category you need to use bulk post editing.  I recently did this on my own blog, merging three different categories into one category called WordPress.

WordPress 2.7 introduced bulk post editing, which I first wrote about back when the beta was released.  I’ll show you how to use this feature to reassign multiple blog posts to a new category.

Here I have my categories list for a demo blog of mine.  As you can see there are 4 blog posts in the Uncategorized category.

categories01

To reassign these posts to a new category I first need to switch to the Edit Posts page.  Now I can click on the drop down list to filter the view to just the Uncategorized posts.

categories02

Click the tick box at the top or bottom of the list to select all of the check boxes at once, then choose Edit from the Bulk Actions drop down menu.  Click on the Apply button.

categories03

Now choose the new category you want to reassign the posts to.  Click the Update Posts button to apply the change.

categories04

The posts will now be members of both the old and the new category.  Once you are satisfied that all of the posts are members of the new category you can simply delete the old category.

Because category URLs for your blog may be in search engine indexes you should also take the time to rebuild your sitemap.

Say thanks by sharing this post with your friends

About Paul Cunningham

Paul has been blogging since 2006, runs a popular technology website, and is the author of several ebooks. Read more about him here, and follow him on Twitter at @paulcunningham.

Comments

  1. Pagan says:

    Awesome! Thank you for the tip! Saves me tons of time.

  2. Your tip save my time and i thank you very much for this.