1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

wordpress slugs from imported posts

Discussion in 'WordPress' started by dnoah, Feb 24, 2010.

  1. #1
    OK. So I exported the wordpress posts and imported into a new domains wordpress.

    Now all of the SLUGS have a 2 at the end and IT WILL NOT let me remove them

    Whats going on?

    Whats the fix?
     
    dnoah, Feb 24, 2010 IP
  2. ms.g

    ms.g Peon

    Messages:
    163
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes, this is a pain in the *ss. Wordpress adds 2 to the slug to prevent error when there's duplicate in title. I think this function was added in 2.6.

    What makes matter worse is that the default import function of Wordpress doesn't have an UPDATE function. Meaning those with same title could be updated. It will just convert the slug of those with same title.

    So, here's a suggestion:

    1. Delete all the posts with 2's, especially if there are existing articles that are important. If there isn't any, delete everything.

    2. Next, check your old wordpress install for duplicate titles (if it is still running). Change all those with duplicate titles. Slugs won't change if you were just updating a post. Add a dash, a preposition or wordings of the title itself to make it unique. If it isn't possible (because you would want to retain the titles), well that really is a big problem.

    If your old wordpress install is not anymore active, you have to edit the exported xml file by hand.

    3. Afterwards, import these posts and them export them to your new wordpress install. No more slugs with 2's after that.

    This is not a very clean solution, I know. This is the only workaround I know. Hope others have a better and easier solution than this one.

    Good luck to you.
     
    ms.g, Feb 24, 2010 IP
  3. chandan123

    chandan123 Prominent Member

    Messages:
    11,586
    Likes Received:
    578
    Best Answers:
    0
    Trophy Points:
    360
    #3
    it appears u added that xml to existing blog which have same titles. so wp added 2 at the end of slugs. otherwise u land up in showing a series of posts for single permalink :D manual removing is better to fix this
     
    chandan123, Feb 24, 2010 IP
  4. ms.g

    ms.g Peon

    Messages:
    163
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hmm... after reading your post again, I guess deleting the contents and re-importing the contents would do the trick. You have to manually clean the database if in case the posts, for some reasons, are not deleted completely.

    Try it out. Maybe it would work.
     
    ms.g, Feb 24, 2010 IP