By default, it is not possible to use the same slug in WordPress permalinks. 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.
Generally speaking, the permalink system included in WordPress core is pretty limited. It does not provide any user-friendly solution to manage the URL addresses. This could be a real problem if you need a tailored permalink structure or simply want to change URLs individually.
As Permalink Manager stores the permalinks independently, you can change each of posts or terms URL addresses any way you like. It does not matter if your new permalinks contain the native slugs or not.
What is a WordPress slug?
The primary use of the slugs is to identify what post, page, category or term should be loaded. That is exactly why the slugs are present in the original WordPress permalinks.
The slug is assigned to the post or term after it is published and it is based on the initial post/term title. By default, the slugs will not be automatically updated after you decide to change the title again.
Why the native WordPress slugs needs to be unique?
To keep things simple, if the slugs had not been unique, WordPress could not have indicated what content element needs to be loaded. Technically, you cannot use the same slug for more than one post or term. It means that WordPress will automatically append the numeric index (eg. “-2”) to the end of slug, if you have previously used it for another post or term.
|Post title||Post slug||The original permalink|
|Hello World |
|Term title||Term slug||The original permalink|
As you can see above, WordPress appended “-2” to the slugs of posts/terms with duplicated title. It does not matter if the rest of permalink is different and URL is unique as a whole. You can add as many homonymous (posts/pages/term with the same title) title, but the native slug will always be unique.
Let’s say we have three posts that have exactly the same title “Hello World“. The native slug will be respectively:
- hello-world for first post
- hello-world-2 for second post
- hello-world-3 for third post
How to duplicate the slugs in WordPress permalinks?
Unfortunately, WordPress itself does not allow to use the same slug in another post/term native permalink. However, Permalink Manager overwrites the original permalinks with custom ones. Therefore, you can edit the custom permalinks manually and remove the obsolete numeric appendix (“-2”) from them.
There are two basic ways to remove the numerals appended (eg. “duplicate-slug-2“) to the permalinks:
- You can manually remove the numerals appended to the slug in individual permalinks.
- You can make Permalink Manager use the actual titles instead of native slug in the custom permalinks.
How to adjust the slugs manually?
The easiest method to reuse the same slug is to use “Current URI” field in URI Editor:
How to use actual titles instead of native slugs?
The manual adjustments of individual custom permalinks could be time-consuming. The alternative solution to allow slug duplicates is to enable “Use actual titles as slugs (Force custom slugs)” mode in the plugin settings. When enabled, Permalink Manager will always use the actual title (eg. “Shoes“) instead of the native slug (eg. “shoes-2“) in the custom permalink.
Check for permalink duplicates
Permalink Manager can detect permalinks with duplicated slugs because it uses a custom algorithm to detect the URLs. Shortly, it checks the full URL address instead of the native slug (part of URL). Hence, the slugs can be reused, but still you need to make sure that the full URL address is unique.
If your new custom permalink is not unique, you will see a duplicate alert displayed below the input field:
Concurrently, you can always check if any of custom permalinks is duplicated in “Permalink Duplicates” section. To display it, please go to “Tools -> Permalink Manager -> Tools -> Permalink Duplicates” admin page.