[resolved] Gaps in post numbering---How to restore? (4 posts)

  1. Orin
    Posted 10 years ago #

    I have my permalink structure set up like so:


    Problem is, some post #'s are missing on account they were deleted drafts. So there's no 7-10, fr'instance. I'd like everything contiguous, and I'm up for rewriting history, but when I try to edit #7 by going to:


    it doesn't work. After manually editing the publish status, post-slug, and timestamp, it still won't show in the admin section and there's still a 404 not found error on the site. Anyone have a solution?

  2. Pizdin Dim
    Posted 10 years ago #

    Because you've deleted your drafts, there's no way to re-use those post-id's again in WordPress, as they're auto-incrementing. I haven't tried this myself, but I believe that you should be able to reinstate them with a web tool called "phpmyadmin". Otherwise, you'll have to dump, edit (change the post-ids) and reload the database.

  3. Orin
    Posted 10 years ago #

    Well, I didn't think I'd be able to do it but it worked. Thank you kindly, Mr. pizdin_dim.

    I went to wrdp1 » wp_posts » browse, then edited the ID value of a newer post (33) to be an empty post (7). Worked fine although now I guess I have a new hole to plug. Oh well.

  4. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Be very careful doing this as unless you know which database tables use other database tables, you risk breaking things.
    For instance, if post(33) had comments and those comments linked back to post(33) by referencing the post ID, then changing the ID will not only cause them to disappear from that post, but they will also appear mysteriously when post(33) does get written.

Topic Closed

This topic has been closed to new replies.

About this Topic