WordPress adds a number after my post name in Permalink (7 posts)

  1. Noumaan Yaqoob
    Posted 5 years ago #

    When I save a post wordpress adds a number at the end of postname in the slug or permalink.

    For example I have setup my site to use

    after saving or updating a post my URL becomes


    This number could be any digit from 1 2 3 4 I dont have many posts yet so I am not sure and all my post slugs have one common last word in the permalink xyz-OneCommonWord abc-OneCommonWord or def-OneCommonWord. These become xyz-OneCommonWord abc-OneCommonWord-2 or def-OneCommonWord-3

    I read that there is some problem using category and postname together so I choose Month and Name format but the problem is persistent. I update the posts and its the same URL with a digit again.

    How I can stop this behavior? Is this a well known issue?

  2. westondeboer
    Posted 5 years ago #

    wordpress will check to see if you have a post with the same name. And if it does, it will add a 2 or 3 after each newer post which has the same subject as another post

  3. Wander
    Posted 5 years ago #

    Hi there all!

    I'd like to have a similar structure, as shown below

    ...even though question1 will be different posts in the categories.

    however, wordpress automatically renames question1 to question1-2 to the postname (field slug), and the permarlink changes to http://www.site.com/exam2/question1-2

    is there a way to repair this problem ?


  4. webrightnow
    Posted 5 years ago #

    In reply to the original post, this happens when you trash a post or page and then try to create a new one with the same name. Make sure you empty the trash before setting your permalink and WordPress will stop adding the extra digit.

    Hope this helps.

  5. Jay
    Posted 5 years ago #

    Emptying the trash, does not work. neither does deleting the "old_slug" from the database or recreating the page.

  6. Jay
    Posted 5 years ago #

    it appears to happen only when the url ends with a number.

  7. LisaWorkingHard
    Posted 5 years ago #

    I am having the same trouble. I mptied all trash (pages & posts) and verified that I do not have any existing pages or posts with the same name and still, WP adds a number to the end.

    Example: Pages

    2010 (main page or parent page)
    - 12 (sub-page)
    - - 3 (sub page)

    Any help would be greatly appreciated.


Topic Closed

This topic has been closed to new replies.

About this Topic