In a WordPress situation, how do you merge categories?

When the iPhone first came out, we created a category called “iPhone” to house all iPhone-related articles. When the iPad was released, we added a new category called “iPad,” because the iPhone and iPad were two separate devices at the time. Since Apple merged all of its mobile operating systems into the current iOS, there appear to be few differences between the iPhone and iPad. In this case, rather than maintaining two distinct categories with similar contexts, it is far more efficient to combine them into a 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.

redirect 301 relative-path-to-old-category-url http://your-domain.com/path-to-new-category-url

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.

Leave a Reply

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