If you’re concerned with keeping your URLs clean and orderly for aesthetic, personal, or SEO purposes, you may wonder how you can remove /category from the URL in WordPress.
I like a descriptive, declarative URL myself, so I’m generally interested in trimming away unnecessary or irrelevant bits. It isn’t always possible to remove variables or other functional elements from a URL, but when it is, it can be in your interest to get rid of them.
One thing that happens in WordPress is “/category” is added to your category URLs if you do not specify a “Category base” in Settings > Permalinks. So for my demonstration site categories, I see:
[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ]https://www.ggexample.com/category/photography/[/ht_message]
We’re going to use the Remove Category URL plugin to remove /category from the URL. When we’re finished, /category will be removed from our site URLs:
[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ]https://www.ggexample.com/photography/[/ht_message]
This plugin only affects category URLs. Post and page URLS are not changed.
Installing the Remove Category URL Plugin
Log into your WordPress admin panel.
In the left column navigation, mouse over the “Plugins” link and click the “Add New” link.
In the “Search plugins…” box, enter “Remove Category URL.”
Once you have located the plugin, click the “Install Now” button.
Click the “Activate” button.
Configuring the Plugin
The plugin starts working as soon as it’s installed and activated. There is no configuration necessary.
Eliminating the Plugin, but Still Removing the “Category” Portion of the URL
The Remove Category URL plugin does exactly what we want it to do, no muss, no fuss. But what if you want to remove /category from your WordPress URL without a plugin?
I’m afraid I have to be the bearer of bad news and tell you that it’s no longer possible to do a simple configuration change to remove /category. You might see a lot of articles out there about using a dot in the Permalinks “Category base” field, but since WordPress 5.x, that workaround doesn’t do the trick.
There are complicated functions.php changes that may still work, but it seems a long way around to create a child theme and add 20 lines of code to functions.php to do something that a plugin can do in a few seconds. So honestly, I didn’t even test them. It would be like using a container ship to deliver a pizza, and no one would do that, right?
Well, Amazon might.
If you don’t want to install another plugin, but you already use Yoast SEO, you can remove /category from the URL in WordPress in the Yoast configuration.
Permalinks, in General, Are a Bigger Subject
We’ve just touched on a single aspect of permalink management, removing /category from the URL in WordPress. But it’s well worth your time to look a bit deeper and learn more about WordPress permalinks.
Whether cleaning up your URLs is beneficial to SEO depends on how messy they are to begin with. But for human-readability purposes, a descriptive URL will always work in your favor.
Have you delved into WordPress permalinks, or do you leave the default configuration in place? Have you ever made permalink/URL changes across your site and seen an SEO benefit? Let me know in the comments.