How to Merge Categories in WordPress

In our previous post on cleaning up tags in WordPress, some of you feedback that you are looking for ways to merge categories too. In this tutorial, I will show you how to merge categories in WordPress.

Situation

When iPhone first launched, we created a category called “iPhone” for every article related to iPhone. Later when the iPad was released, we again created another category call “iPad”, since at that time, iPhone and iPad are two different devices. When Apple merged all its mobile OS into the current iOS, there seems to be very little differences between iPhone and iPad anymore. In this case, rather than maintaining two different categories of similar context, it is much more efficient to merge them together into one single category.

The merging process

Here is what we need to do:

1. Move all the posts from one category to the other (the one you want to merge into).
2. Delete the duplicate category.
3. Add a URL forwarder to redirect the previous category URL to the new URL.

The steps

1. In your WordPress dashboard, go to “Posts -> All Posts”. Filter all the posts with the category you want to delete.

category-filter

2. Check out the number of posts in this particular category.

category-no-of-items

At the top of the screen, click Screen Options and enter the number of posts to appear on the screen.

category-set-posts-on-screen

3. Check every single post in this category. Click Edit.

4. Add the category that you want to merge into.

category-change-category

5. Once done, go to “Posts -> Category”. Delete the category from the list.

6. Lastly, using a FTP application, download the .htaccess file (assuming you are using a Linux web host) from your server root. Open the .htaccess file with a text editor and addd the following line to the top of the file.

For example, the old category URL is at http://your-domain.com/category/old-category and the new category URL is http://your-domain.com/category/new-category. So in your .htaccess file, you will put:

redirect 301 /category/old-category http://your-domain.com/category/new-category

Save and upload (and replace) the .htacess file to your server.

That’s it. Alternatively, you can install the Redirection WordPress plugin to manage the redirection. This will, however, increase your server load. Using the .htaccess method is more straightforward, though it can be a little bit intimidating to the new users.

Building Interactive Longform Storytelling Contents on WordPress

Building Interactive Longform Storytelling Contents on WordPress

This ebook is all about interactive longform storytelling: what it is, why you need to embrace it and its benefits, how to create one, and the available tools to help you create your first longform content.

Get it now! More ebooks »

4 comments

  1. Hi, I have searched on the web for this title and reached
    here. I am sure this article is better than any others are.  However, I have a small doubt (as I am not pro
    on this subject) regarding the .htaccess redirect. Please explain a little more.
     

    1. Which is the part that you are not sure of?

      1.  Thanks, I think each old category need a 301 redirect?

        1.  Yes, you are right. Each old category need a 301 redirect. The instructions above show you how to do that with the .htaccess file.

Comments are closed.