How to remove Category Base WordPress

Developing a site with WordPress I needed to delete the Category base from the URL.

By default WordPress adds category to the categories.

I was Googling arround and I found two solutions.

A. Code Solution

Add this line to your .htaccess file (in your root WordPress installation folder)

RewriteRule ^category/(.+)$$1 [R=301,L]
Code language: JavaScript (javascript)

B. Plugin Solution

You can use this plugin wich does not require any kind of coding or set up.

WP No Category Base

The plugin requires no setup or modifying core wordpress files and will not break any links. It will also take care of redirecting your old category links to the new ones.

Download it from:

About Ricard Torres

Senior Front-end Software Engineer at Netcentric, from Barcelona, Haidong Gumdo Instructor (korean martial art of the sword), street photographer, travel lover, TV addict, Boston Red Sox fan, and privacy advocate.

@ricard_dev @ricard_dev

📝 Blog 🎙 Podcast


Leave a Reply

Add <code> Some Code </code> if you need to.