1. Home
  2. Docs
  3. Tutorials
  4. Allow slugs duplicates in WordPress permalinks

Allow slugs duplicates in WordPress permalinks

Would you like to duplicate permalinks and use the same slug multiple times? Unfortunately, if you try to use the slug more than once, WordPress will append numeric indexes to the end of permalink. It is really frustrating especially if you would like to use the same title for multiple subcategories or child pages assigned to different parents.

How it works in Permalink Manager?

Many WordPress users try to use the same slug across multiple child categories, terms or pages. Every time you publish the post or term WordPress will automatically generate an unique slug based on title. In this short article you can read about the role of native slugs in WordPress.

There is no out-of-box solution to make it possible to duplicate the slugs in vanilla-version of WordPress. Although, you can easily get around this problem and keep the duplicated slugs in the custom URLs controlled by Permalink Manager.

Please note that Permalink Manager does not allow to duplicate the native slugs. The plugin uses a custom permalink system where the URLs can be completely customized. Therefore, you can use the same slug multiple times in different custom permalinks as long as the URLs are unique as a whole.

Why the native WordPress slugs have to be unique?

To keep things simple, if some of the slugs are not unique, WordPress will not be able to indicate what content element should be loaded. To avoid this from happening, if the user tries to save the post or term with the same slug, WordPress will automatically append the numeric index to the end of slug.

How to duplicate permalinks with Permalink Manager?

It is simple, all you need to do is to enable “Use actual post/term titles” mode. After that, Permalink Manager will use the actual titles instead of the slugs (post names).

Above all, you can also edit all post & term permalinks individually. Here you can find more information on how to customize the permalinks one by one.

To do so, please switch on “Use actual post/term titles (Force custom slugs)” mode in Permalink Manager settings. You can access them via “Tools -> Permalink Manager -> Settings”.

Please note that Permalink Manager will automatically use the actual titles only in the new posts and term. To regenerate the old permalinks please use “Regenerate/reset” tool available in “Tools -> Permalink Manger -> Tools” section. A more detailed instructions on how to reset the WordPress permalinks is available here.

Below you can see a simple example of two custom permalinks that have two different native slugs (highlighted with red), but have the same title and custom slugs (highlighted with green)

Sample permalinks with slug duplicates

Of course, as I stated above you can always manually adjust the custom permalinks. Below you can see an example of product category editor, where you can check the current slug & custom permalink.

When “Use actual post/term titles (Force custom slugs)” mode is enabled, Permalink Manager will use the actual title (“Shoes”) instead of the native slug (“shoes-2”).

There are two “Shoes” subcategories defined, that is why the slug for this term is “shoes-2”.

At this point, Permalink Manager will generate the new permalinks without the numeric indexes. Nevertheless, in some specific situation this occasionally might lead to permalink duplicates. In this case please go to “Tools -> Permalink Manager -> Settings” to check and remove the URL duplicates.

Make sure that the permalinks are not duplicated

Was this article helpful to you? Yes No