How to Change the Category Base Prefix in WordPress

Posted on February 2nd, 2010 by in Tutorials | 4 Comments  
How to Change the Category Base Prefix in WordPress

We got several requests asking the same question: How to modify the category base prefix in WordPress? Well there is a very easy way to change the category base prefix, but there is no real solution to completely remove this prefix. In this article we will show you how to change the category base prefix in WordPress, and we will also touch base on a possible way that will allow you to remove the category prefix entirely.

What is a Category Base Prefix?

In your URL structure, you will see something like this http://yoursite.com/category/wordpress

That word category is the base prefix that all WordPress blogs will have as long as they are not using the default permalink structure.

How to Change / Modify the Category Base Prefix?

It is really easy to change that prefix to anything you like. For examples then your URL would look like yourdomain.com/articles/wordpress

First you would need to go in your WP-Admin Panel and go to Settings » Permalinks

There you would see an Optional box which allows you to change the category base prefix and the tag base prefix. (Example Below)

How to Change Category Base Prefix in WordPress

Simply add the text that you like, and you are done. This way is guaranteed to work because it is a hard-coded option within WordPress.

How to Remove Category Base Prefix in WordPress

There is no bug free way to get this done. For those who want no problems with their site, we recommend that you do not even try this because it can lead to problems. There is a plugin that allows you to completely get rid of the prefix, so it would be yourdomain.com/wordpress rather than yourdomain.com/category/wordpress. This plugin is called Top Level Directories.

Known Issues:

This plugin will not work if you have a permalink structure like %postname or %category%/%postname% and there is currently no workaround.

If you add a suffix to your permalink structure (such as .html) you can fix this issue. For example, try %category%/%postname%.html – This is not ideal, but there is no good solution for this issue.

For now we suggest that you stick with a modified base prefix if necessary. All we can do is hope that WordPress adds this feature in the future versions.

About

Editorial Staff at WPBeginner mainly Syed and David.

Post comment as twitter logo facebook logo
Sort: Newest | Oldest
gnuboss 5 pts

Thanks for the info, this is a quick and simple, although often overlooked way to sort the category and tag base issues out..

To entirely remove the Category base I used to use a plugin called WP No Category Base which worked well, but can cause problems when you have a page and category with the same name - E.g. Page = Hosting (domain.com/hosting/) and a Category = Hosting (domain.com/hosting/) - but using .html suffix may help -- but there are bound to be implications.

I always like to use the .html suffix as well as changing the prefix - thanks for sharing - a simple but effective technique!

If you want to do this, you should probably do this right when you begin your blog.

Otherwise, search engines which have indexed your

example.com/tags/some-tag

page will get a 404 (not found) error when trying to access the page again.

Some SEO plugins handle this case and give a 302 (redirect) status when you change a permalink, but I'm not sure about tag URLs.

I didn't know that it was so easy to change.

Tweets about us: