Do you want to change the base prefix of categories on WordPress?

By default, WordPress automatically adds " / Category / As a prefix to the URLs of all category pages.

In this tutorial, we will show you how to change the base prefix of categories on WordPress. We will also tell you whether or not you should delete the base prefix.

But before, let's discover together How to install a WordPress blog in 7 steps et How to search, install and activate a WordPress theme on your blog.

Then, back to why we are here.

What is the basic prefix of the categories? Should you change them?

Each category on your website gets its own page and his RSS feed. You can view all posts classified in a category by visiting the archive page for that category.

By default, WordPress adds "categoryAs a base prefix to URLs for category pages. This differentiates pages and publications from category archives and labels.

For example, if you have a category called "News", its URL will look like this:

http://exemple.com/category/nouvelles/

Likewise, WordPress also adds the prefix "tag" to URLs for tag archives.

http://example.com/tag/iphone/

This user-friendly URL structure allows users and search engines to understand what type of page they are visiting.

Read also: How to fix the error of access to a page of the WordPress dashboard

Most websites don't need to change the base prefix at all. However, if you are creating a niche website where you want to use a different word or phrase for your categories, you can change the categories base prefix to reflect it. This also applies if you want to use a base prefix in French.

Changing the base prefix of a category on WordPress

Modifying the basic prefix of categories is quite simple on WordPress.

You must visit the page " Settings> Permalinks And scroll down to the "Optional" section.

Modification of permalinks

Here you can enter the prefix you want to use as the category name. You can also change the base label prefix if you want.

Do not forget to click on the button « Save Changes To memorize your settings.

See also: 8 WordPress plugins to backup and restore your website

Configuring redirects after changing the base prefix of categories

If you change the basic category prefix on a new website, you don't have to do anything. However, if you do this on an existing website, users may run into a lot of 404 errors.

To solve this problem, you will need to configure redirection to ensure that search engines and visiteurs regular users are correctly redirected to the correct category page on your website.

First you will need to install and activate the plugin " Redirection ". For more details, check out our step by step guide on how to install a WordPress plugin.

When activating, you must visit the " Tools> Redirection To configure the redirection.

Configuring redirects

Scroll down to the "Add a new redirect».

First, you need to add /category/(.*) in the " Source URL ". After that, you need to check the box next to the regular expression option.

In the Target URL field, you need to add your new category base prefix like this / news / $ 1. Don't forget to replace the " category By your new category prefix.

Click the " Add a redirect "(Add Redirection) to save your changes.

That's all. Now all your users and search engines will be redirected to the correct URLs using your new category prefix.

You can also apply this operation for labels.

Recommended Resources

Discover more resources recommendations that will accompany you in the creation and management of your website.

Conclusion

Here is ! That's all this tutorial, I hope it will allow you to change the base category prefix on WordPress.

However, you will also be able to consult our resources, if you need more elements to carry out your projects of creation of Internet sites, by consulting our guide on the WordPress blog creation or the one on Divi: the best WordPress theme of all time.

If you have some Comments or suggestions, do not hesitate to offer them. If you liked this article, ndo not hesitate to share on your favorite social networks.

...