How to Remove Category From WordPress URL

In the previous week some of our viewers asked is it possible to remove categories from your URLs in WordPress website? So my answer to this question is yes! Off course, you can easily remove category form WordPress URL in your WordPress-powered blog or websites. If you are also one of them and trying to work out to remove categories from category URLs, but couldn’t seem to remove it, then you are really at the right place.

WordPress is a Content Management Software that comes with many features. One of these features is adding categories to your blog/site content. With the help of categories, you can sort the content that are related to each other’s. WordPress has a special structure for its categories. However, by default you can see the main category in your WordPress URLs.

Removing category slug from WordPress URLs or Permalink will give you several benefits. For example it will improve your site SEO and will also give you better user-friendly URLs. Removing category from URL means removing /category/from category URLs on a WordPress blog or site. We want to let the slug of category taxonomy appear in URLs but not the slug or word category itself.

In this article, we are discussing different ways to change the default category or remove it from your WordPress URLs and to achieve the same. But it is to be kept in mind that if you have a fresh WordPress installation then you have to setup your permalinks according to your requirements. Also remember that if you change permalinks structure on a live site, you may lose a lot of traffic. In order to avoid lose in traffic, you have to redirect your site old URLs to new ones. This will avoid any loses in your site SEO and site traffic.

Let say your website is and you wanted it to be, so we are always here to help you and resolve this issue for you. With our quick and unique and easy-to-understand guide, you will be able to achieve this task. Now to get rid of categories, in this blog post we will discuss different methods.

1. Remove Category from WordPress URL with Permalinks Method

In fact this is one of the easiest and simple method for removing categories from yours site URL. This method to remove category from WordPress URL is done in WordPress itself.  All you need is to set your permalinks to /%category%/postname%/ and if you leave the category base blank, in this case, it will display the WordPress default category. It is, therefore, to be kept in mind that providing dot to Category base in setting is must. If you are using default permalink structure, you have to change it to the custom structure. Below are some important steps involved in this process, you should follow,

  • First of all you have to log in to your WordPress dashboard.
  • From the left hand side, hover over Settings >> Permalinks
  • Select Custom Structure
  • Add/%category%/%postname%/ after your domain name
  • Next, type in a dot (.) in the Category Base section.

Remove Category from WordPress URL with Permalinks Method

Once you have made the changes, now visit and check a post after you have saved the setting and also check the URL. Now it won’t have the category base or category slug now. As this method is currently working very well, but there is no assurance that it will also work in the future as well.

Permalinks, in general and in itself, is a broader and bigger subject that need more time to be familiar with. In the above few paragraphs we have touched and discussed about single aspect of permalinks management. We have explained how to remove category from WordPress URL. For human-readability purpose, a descriptive URL is useful and will always work in your favor.

But it is well worth your time to go through and dive deeper into this subject and learn more about WordPress permalinks. In our upcoming article we will try to discuss and explain this in more details. A clean and clear URL is always beneficial to SEO ranking, because it depends on how messy they are to begin with. As an expert user, probably you may have delved into WordPress permalinks or do you leave the default configuration in place?

2. Remove Category from WordPress URL with Plugin Method

This is another method which is used for removing category from URL of WordPress site. In this section of our blog post, we will show you, and you will learn how to remove category from your URLs in WordPress site with the help of WordPress plugins. There are different WordPress plugins used for this purpose. These plugins will enable you to easily remove category slug from your website URL.

2.1 Removing Category from Your URLs with Yoast’s SEO Plugin

In this method, we are using a very popular WordPress SEO plugin, called Yoast SEO plugin. As you know, Yoast SEO is a major and popular WordPress plugin to improve your website’s SEO. Apart from SEO features, you can remove the category from WordPress URLs in a few minutes. It is really another quick and easy way to remove category form yours URLs with this WordPress plugin. Yoast SEO plugin comes with great features and handy setting to remove the category base for you.

We have heard about that the latest version of Yoast SEO plugin has discontinued this option of category removal from URLs. However, we have checked and confirmed that this feature is still offering and silently working. The following steps are involved in this process, you should follow.

Visit Yoast SEO

Next, select “Search Appearance” option.

Next, click on the “Taxonomies” tab at the top

Now check “Hide the category base (usually/category/) from the category URL.

Next, click on Save Changes.

Remove Category from WordPress URL with Yoast’s SEO Plugin

2.2 Removing Category Base with the Help of Category URL Plugin

This is another popular WordPress plugin that is used for removing Category Base with the help of Category URL Plugin. It has more than 70,000+ active installations and higher user’s rating. Instead of this feature, it also offers additional advantages for its users. With the help of this you will be able to remove categories from your website’s URL. After installing, the plugin, it starts working immediately. You just need to download, install and activate it.

Remove Category URL Plugin

If your website is older than six months, you can try using this plugin. Once you download and install this plugin, you will don’t need to configure anything or bring any modification in any file. It will redirect the old category permalinks with the new ones, and it is really better practice for SEO purpose. However, if you use several WordPress plugin, it might slow down your website loading speed and therefore, you will need to keep more plugin up to.

2.3 Removing Category from Slug Using FV Top Level Categories Plugin

FV Top Level Categories is another plugin that is used to remove category base from WordPress Permalinks. Writing a function is also a method for the functionality however, it makes the blog or website slower. It is also alternate option of the above mentioned WordPress plugin. This plugin will enable you to remove the category slug from URLs of yours website.

3. Remove Category from URLs With .htaccess Method

In the above mentioned method we have explained how to remove category from WordPress URL with the help of WordPress plugins and WordPress settings. Now we are going to manually remove the category form your WordPress URLs. This is another method of removing categories from your URLs with the help of .htaccess method. You can also add this code to your .htaccess file via FTP rather than using a dot. While adding this code one point should be noted that you have to add this code before closing </IfModule> tag in the file.

Now do so, you have to make some changes to your .htaccess file. First of all, you need to access to this file. You can reach this file either through cPanel or FTP method.

With the help of this method you will be able to remove category slug from WordPress permalink manually in the .htaccess file just by adding the following line of code. Now just copy and paste the below code to your .htaccess file and save your changes.

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

4. Remove Remove Category From WordPress URL by using code in functions.php method

This is another method which is used for remove category from WordPress URL. Before moving to complete this method, you have to make sure you haven’t made any changes to your Category Base Setting in Permalinks structure. Because the in this methods the codes are used and these codes looks for the word “category” and if it can’t find it, it won’t work.

Now to complete this method, first of all you have to,

Go to Appearance >>> Editor.

Look for funtions.php file

Now add the below code before last PHP tag.

function remove_category( $string, $type )  {           if ( $type != ‘single’ && $type == ‘category’ && ( strpos( $string, ‘category’ ) !== false ) )          {              $url_without_category = str_replace( “/category/”, “/”, $string );              return trailingslashit( $url_without_category );          }      return $string;  }     add_filter( ‘user_trailingslashit’, ‘remove_category’, 100, 2);


In this article we have discussed different methods with the help of which you will be able to remove category from WordPress URL in your WordPress-built website. All the above methods are useful and will work, however, we strongly recommend to choose and use that method which is going to add less codes in your WordPress site or blog. We would like to recommend you to use the permalinks method, as it do not need any code or plugin. But this is useful for those who have recently launched their website. This method is very simple and can be easily modified by changing the Permalinks WordPress settings of your Website. As adding several plugins to WordPress site can slow down your site speed, therefore, customizing Permalinks structure need no plugin or additional codes. And it is one of the simple and easy method.

For those peoples who’s website is older than 6 months, we would like to recommend them to use the plugin method. Furthermore, in plugin method, we recommend you to use the Remove Category URL plugin. The Yoast SEO plugin is also useful, because, this plugin can be used for both purposes, SEO and removing categories from site URLs.

In the second method, we have discussed how to remove category from the WordPress URL, by installing WordPress plugin. As you know that plugins are a very good way to add or remove functionality form a WordPress website. We have also discussed three different WordPress plugins that can be used for removing categories from WordPress URLs. A WordPress plugin called Category URL Plugin, is one of the most popular and widely used plugin that is used for this purpose. Another plugin is Yoast SEO plugin. If you have already installed Yoast SEO plugin on your WordPress site or blog, then you can easily remove a category from URLs.

The above two mentioned methods, in this article, can helps you to remove the category from WordPress URLs. However, if you know coding skill and knowledge about any programming then we recommend you to choose the other method. For advanced users, we highly recommend editing the .htaccess file to remove a category from URL.

What method do you prefer to remove category from WordPress URL, first, second, third or fourth one? Have you ever made permalink or URL modification across your site and seen an SEO advantages? Let us know in the comments section below. If you like this article, don’t forget to share it on social media with your friends and colleagues.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top