If your category page links on your WordPress site have stopped working, and lead to “page not found” errors, there could be many reasons for this. But, for users of the WordPress SEO plugin, there is a known issue that affects some users where the “strip the category base” feature may stop working, so that links to category pages also stop working. Here is a simple and quick workaround for this specific case.
About: WordPress SEO Plugin “Strip the Category Base” Feature
WordPress SEO is a popular and very useful WordPress plugin, that combines numerous functions related to SEO and WordPress sites (such as XML sitemaps, social media profile links, title and description templates, etc). One such feature is the “strip the category base” feature, which removes the “category” part of category page URL’s.
Problem: WordPress SEO Plugin “Strip the Category Base” Causes Broken Category Links
The problem is that all links to category pages for a WordPress site stop working without warning. If you use the WordPress SEO plugin, that may be the source of this problem.
In this case, the WordPress SEO plugin would have previously been set up (maybe even for several years) to enable “strip the category base”, without any issues. At some point, this feature may have stopped working properly, even though the setting had not been changed. This seems to have been noticed a few years back, and may have been fixed, though this happened for me with version 2.2.1.
For example, http://techuserfriendly/deals/ normally links to the Deals category page on this site. Visiting http://techuserfriendly.com/category/deals/ still would work to display properly, but normally that should redirect to http://techuserfriendly/deals/. But with this problem, all category page links, including http://techuserfriendly/deals/, would lead to a “page not found” error.
If you’ve found that the WordPress SEO plugin is the source of the problem, then the solution or workaround below is straightforward.
Solution: Disable “Strip the Category Base” in WordPress SEO Plugin
With the goal being to get the category page links working properly, the quickest and and most-stable way is to disable the “strip the category base” features of the WordPress SEO plugin, and then to use another plugin to handle removing the “category base” from category page URL’s.
That is to say, the cause of this problem could be one of several issues, including a possible error within the WordPress SEO plugin, a conflict with another WordPress plugin, a problem with the site’s theme, or other issues. So, regardless of the reason for this “category base” problem, the simplest and most surefire solution would seem to be using another plugin to remove the “category base”.
So, here is the simple workaround (basically disable a feature, and install a plugin).
1. Install and activate another plugin to remove the “category base” from all category page URL’s. Remove Category URL is a recently updated, highly rated, and active plugin that will do the job. An alternative is WP No Category Base.
2. De-select “Strip the category base” in WordPress SEO plugin, under “Advanced” settings for WordPress SEO plugin, in the “Permalinks” tab. Save changes.
Summary: Workaround to Fix the WordPress Category Base
Again, the cause may or may not be the WordPress SEO plugin, but the goal here is to get the category page links working in a stable and quick manner.
Some other solutions are to re-select and re-save the “strip the category base” feature, or to make edits to the WordPress SEO plugin. The re-save/re-select method seems to be only a temporary solution that lasts until other site changes are made, and editing the plugin requires more time and effort of course.