• There is a website that links to a specific post on my site, using the url http://site.com/?p=33 . Unfortunately, I made a mistake and deleted the post that was there. Now I have no idea how to create a new post that will have the same URL. Can someone help?

Viewing 3 replies - 1 through 3 (of 3 total)
  • That particular number is auto incremented in the database. Making a new post take that particular ID isn’t a straight forward thing.

    The issue is that the wp_posts table has the value and it’s also linked into wp_post2cat table to indicate which category the post belongs to.

    So if you really want to do this, first ensure that the Post ID 33 is completely missing from the database, then create you new post. Take note of the new Post ID, then go into the database and replace the new ID with 33.

    Regards

    Thread Starter fekketcantenel

    (@fekketcantenel)

    Thanks, that worked!

    You’re welcome. You might want to enable Pretty Premalinks so that people would start linking to blog.com/archives/2006/03/16/post-title instead of a particular post ID.

    That way, even if you blow away a post, you just need to create a new post with the same title to have things work again. Lot easier.:)

    Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to customize the post’s ID?’ is closed to new replies.