We previously discussed how to add categories and subcategories to WordPress and I received feedback from some readers that they also want to learn how to merge categories as well. So, we will discuss how to merge WordPress categories in this tutorial.
How to Merge WordPress Categories
Here is the outline of tasks we will do to merge categories :
1. Transfer the posts to the category you intend to merge into.
2. Remove the category you no longer need.
3. Create a URL redirect from the removed category to the merged category.
Steps for Merging WordPress Categories
1. Go to “Posts -> All Posts” in your WP dashboard. Choose the posts with the category you no longer need.
2. WordPress will show you total number of posts in that category. It is in the top right corner.
3.Click on the Screen Options at the top of your screen. Enter the post number you took note of to show on screen.
4. Put a check on each post in the category and then click Edit.
5. Now, add the category you intend to merge into.
6. When you are done, proceed to “Posts -> Category” and delete the category that you don’t need anymore.
7. Finally, use an FTP application to download .htaccess file from your hosting account. Open the downloaded file using a text editor. Now, you should add something similar to the line below to the top of the .htaccess file.
For example, If the deleted category URL is http://www.yourdomain.com/category/old-category and the merged category url is http://www.yourdomain.com/category/merged-category, you should add the following to .htaccess file:
Save the file and upload/replace the file .htacess. And you’re done.
An alternate method for redirection is to install the plugin Redirection WordPress. This plugin can be used to manage url redirections. The only drawback is that installing this plugin could slightly increase the pageload time. While the .htaccess method may require more effort on your part, it is a better way to redirect urls.