• Sorry if the title doesn’t make much sense. I’m using my own item numbers as friendly urls, for example mywebsite.com/12345/, but WordPress insists on add -2 to the end, making it mywebsite/com/12345-2/.

    The 12345 is not wordpress generated, just my own naming convention. There are no posts or pages, published, trashed or anything else.

    Also no active plugins and a brand new install. What is adding the -2 and how can I stop it?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p

    (@t-p)

    Usually when WordPress appends the “-2” to a slug, that means you still have the old content by the same name, probably in the trash, draft, etc. If so, try emptying it.

    For more info, please see https://www.ads-software.com/support/topic/permalink-keeps-adding-2-to-new-pages/?view=all

    Please note as stated in that thread “Slugs” cannot be all numeric, by default.

    Thread Starter WebTrooper

    (@webtrooper)

    Thank you, TP. It seems I used numbers as titles (and slugs) in the past, but apparently I remember wrong because it’s not possible. Anyway, that link led me to the plugin, https://www.ads-software.com/plugins/allow-numeric-stubs/ I don’t need paginated posts so hopefully it’s still works with current wordpress. Gonna give it a try. Thanks again! ??

    Hi I want to add one more point regarding addition of 2 number at the end of the permalink, Sometime when we upload images with just numbers name or by any similar name that matches with post or page name, in that case as the images are also a post type in media library, so that conflict with page or post permalinks and due to duplicate naming wordpress automatically add -2 at end to differentiate.

    Solution is, go to Media Library, search by the name for which you are getting duplicate issue, when you find the image click on its thumbnail, it will open a popup with image details, at bottom you will see a link “Edit more details“, clicking on it will open media image post page, where you can update its permalink, change it to something different, for example add -img at end, and then try to change your post or page permalink, and it will update now !

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Permalinks set to /%postname%/ still adds -2 to numeric urls’ is closed to new replies.