WordPress adds a base of /category/ to the all the category archive permalinks. This means that your category links look like this:http://example.org/category/uncategorized/
For the most part, that’s a good thing. If a category and post or page have the same slug, they won’t interfere with each other. But sometimes you need something else, so this tutorial shows you how to change the category base or remove it.
Change the Category Base
You can change the /category/ base to be something else, like /topics/ or /articles/ or whatever you like.
- Go to Settings > Permalinks
- In the Optional section, find Category base and add whatever you like there.
- You can edit the Tag base there too.
Remove the Category Base
But there are times when you would like to remove the Category base altogether for your Category archive page URL. I prefer this when using a custom WordPress permalink structure of/%category%/%postname%/
There are several plugins that will do this for you:
- WordPress SEO by Yoast
- No Category Base (WPML) by Marios Alexandrou
- A post on WPMUdev by Joe Foley
Flush Permalinks
Be sure to flush your permalinks each time you make changes to your WordPress URL structure. It’s not always needed, but can help.
Go to Settings > Permalinks; click Save Changes.
Which Is Best For You?
You If you use WordPress SEO, that’s probably best for you.
The WPMUdev method works well most of the time.
The WP No Category Base plugin hasn’t been updated in awhile, but still continues to work well.
If you have another method, please let me know!
9 responses to “Remove Category Base from WordPress Permalinks”
If you don’t want any category at all you can use this method.
Select Custom Structure in permalinks and add /%category%/%postname%/ after your domain. Adding “/” to the category base doesn’t work, you have to add a period/dot. I wrote a tutorial for this here: http://jonnyjordan.com/blog/how-to-remove-category-from-your-urls-in-wordpress/
Thank you for your comment, Jonny. Your method is exactly the same as the post I referred to above – WPMUdev by Joe Foley.
Hi Marcy,
I added period (.) in category base but when I checked my Canonical tag it also added period (.) in the canonical URL.
Example:
Look how I want my category URL:
http://www.example.com/php-examples/
But unfortunately it looks like:
http://www.example.com/category/php-examples/
When I added period (.) in category base of permalink it accepted and work properly online. But when I checked Canonical URL it show looks like –
http://www.example.com/./php-examples/
It replaced category and add (.) in that.
Please tell me what should I do?
It’s best to use the Yoast SEO plugin. I can’t answer your questions about this; I simply presented 3 methods that worked at the time.
Just FYI that plugin missing now… have new one:
https://wordpress.org/plugins/remove-category-base-littlebizzy/
Thank you for the link to the new plugin, Armin.
No, filters don’t work, if you added your MailChimp form a long time ago. You have to get updated form code from your MailChimp account