Skip to content

How to Remove the “Category” from a WordPress URL

Categories have been in WordPress as long as I have. They have important organizational value: they tell you what’s related to what—and they give your visitors a good way to browse your site. But what do you do when it’s not serving your URL structures?

Today, we’ll tackle two related small changes you might want to make when you remove a “category” from a WordPress URL: 1) removal of the segment or 2) a rename.

Renaming categories is a common request, and as we’ll get to in a minute. (It’s basically included as a WordPress setting already.) It’s a little more complicated in WordPress to remove “category” from URLs entirely. This might be the case if you have one called, say, How to Brew Coffee, and you wanted to make that a top-level page on your site. example.com/how-to-brew-coffee vs example.com/category/how-to-brew-coffee. It’s subtle difference, but you may care about that.

Here’s the video explaining how to completely remove the “category” segment from the URLs of your WordPress site:

Quick Detour: Change “Category” with WordPress Category Base

As I said, you can use a setting called WordPress “Category base” to just change the word category to something else, like topic or genre. This is a useful if you don’t mind the extra length of the URL, and are just looking to make your site more personal. So you’ll have something like example.com/category/category-1 transformed into example.com/genre/category-1. Here’s how you’ll do that:

  1. Be logged into your WordPress administration area.
  2. Navigate to “Settings > Permalinks” from the left-side menu bar.
  3. Scroll down past the main setting for your site’s permalinks foe posts. You’ll see the heading “Optional” and then two fields. To change the way your categories appear in your WordPress site URLs, you’ll change the “Category base” value to whatever you want. To stick with our theme, I’ll set it to genre. Now all my categories have new URLs.

So, that’s how you change the value of your WordPress category base. But what if you want to remove it entirely? That’s our next topic…

WordPress Remove “Category” from URLs, Step-by-Step

Our goal in these how-to guide is to make WordPress remove “category” from permalink (s) across our site. To do that, we’ll be using a plugin: No Category Base (WPML) from Marios Alexandrou. Here are the steps we’ll need:

  1. In the WordPress administration area of your site, got to “Plugins > Add New.”
  2. Search for “No Category Base (WPML).” You’ll install and activate the plugin from this screen. To that, first click the “Install” button on the plugin listing, then once that has changed to an “Activate” button, click that as well.
  3. You’re done, you’ve removed “category” from WordPress URLs. With the plugin installed and activated there’s not really anything else to do. (It has no setting screen.)
Yay! 🎉 You made it to the end of the article!
David Hayes
Share:

4 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Brandie
January 20, 2020 2:09 pm

The plugin, No Category Base (WPML), worked like a charm! Thanks!

Other sites were saying to change the permalink, Custom Structure, to /%category%/%postname%/ then put a dot or period in Category Base under Optional. This was making the link point to a page instead of the Category post, so if there was a page with the same name as the Category, it would display the page and not the category post and if there was not a corresponding page I would get an error page. Neither was what I was looking to do.

So, thank you for this easy solution. I was only leery because I didn’t want to add another plugin to the site.

Shaun
January 5, 2020 12:12 am

Hi, how do we “redirect all /category/ URLs to their corresponding new URLs via 301.” – that’s something that concerns me.

Sounds simple if you do it a lot, but, like others my site is well established (almost 4 years), has many external links to my site. I’d like to get rid of /category/ in the url without breaking anything and ensuring no link love or broken links etc etc.

Mike
April 18, 2019 4:44 pm

If you remove the category from the URL on a site, does that effect the search engine listings that have already been created?

Brian
September 12, 2019 4:09 am
Reply to  Mike

If they’ve been indexed by search engines, then yes. General rule of thumb: Never change your URLs without valid reason, e. g. in the course of a website relaunch. If you only consider doing this for optical reasons (URL looks nicer), I would highly advise not to, especially if it affects a large amount of URLs with good SERP rankings. If you do decide to change the URL structure though, make sure to redirect all /category/ URLs to their corresponding new URLs via 301.

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!