How To Remove Category Base from URLs in WordPress



Removing Category From WordPress Dashboard Permalink Settings

Method 01

I was trying to work out how to remove /category/ from my category URLs and I just couldn’t seem to remove it. For example I just wanted to be , but I found out a quick trick to achieve this.

To get rid of category you set your permalinks to /%category%/%postname%/ and then set the Category Base to period/dot.

*If you leave the category base blank it will display the wordpress default category.*

  1. Go to Setting > Permalinks
  2. Select Custom Structure
  3. Add /%category%/%postname%/ after your domain
  4. Change Category Base to period/dot.
How To Remove Category Base from URLs in WordPress
How To Remove Category Base from URLs in WordPress

Removing Category From Your URLs With Yoast’s SEO Plugin

Method 02
  1. Go to Yoast SEO
  2. Select advanced
  3. Click on the tab permalinks at the top
  4. Check Strip the category base (usually /category/) from the category URL.
removing category from urls plugin

Removing Category From Your URLs With .htaccess

Method 03

To remove the category base manually in the .htaccess file just add this line of code.

RewriteRule ^category/(.+)$$1 [R=301,L]

Removing The Category Base with the Remove Category URL Plugin

Method 04

This plugin also removes the category base and seems to be very popular as well. I would recommend this method the least because too many plugins will slow your website down and require you to keep more plugins up to date.

remove category plugin


All four methods above will work for removing the category slug from your URLs. Although I would recommend choosing the method that is going to use less code in your case.

We will be happy to hear your thoughts

Leave a reply

Compare items
  • Total (0)
Shopping cart