• I have approximately 15 pages and 2 posts in my blog.

    Page id’s range from 43,44,45,51 to 143,144 to my latest page at 913.

    Where do they ID’s come from? That is, why are they not all (or even close to) sequential? And, why would it jump almost 800 numbers for one post?

Viewing 7 replies - 1 through 7 (of 7 total)
  • If I was you I will not mess around with ID they are all saved in database for your information

    IDs are assigned by the MySQL database engine to entries in the wp_posts table. That table is used for many different types of entries including posts, pages, attachments and revisions. You do not have any control over the values used.

    Thread Starter dankelly613

    (@dankelly613)

    Thanks…

    I figured it out.

    Note: I’m not looking to control or edit them. I just want to know why I have 16 pages, and my post_ids are now into the 1000’s.

    It’s because every time you hit the Publish button, and new POST/PAGE is added to the database, with a new ID.

    ALL OF YOUR OLD REVISIONS are in the database… and, stangly, there’s not built-in way to access them.

    If you make one change to a post with 1000 words – say, you change the spelling of a word – and entirely new record is saved in the database.

    Your database can get HUGE, really quick.

    So, millions of wordpress users have HUGE databases of archived content, and if they mess up their post, they think they’re screwed… well, I guess they are because there’s no built-in way to access those old revisions. (I’m sure there’s a plugin, but this should be built in… if you create a feature to archive content, you need to create a way to access that content.)

    #1. There should be a built in way to access them.

    #2. There should be a built in way to delete old junk.

    On your Edit Post screen make sure under Screen Options that the Revisions box is check and then you will see the Revisions module at the bottom of the Edit Post screen.

    Look at plugins such as https://www.ads-software.com/extend/plugins/better-delete-revision/ for more assistance with getting rid of revisions.

    https://codex.www.ads-software.com/Editing_wp-config.php#Post_Revisions discusses how to disable revisions.

    Thread Starter dankelly613

    (@dankelly613)

    Thanks MichaelH!

    Great info.

    I found better delete revision yesterday.

    I used it, but it would be nice to be able to keep one old revision for each post and delete revisions individually.

    But, it certainly did it’s just of getting rid of 1100 old revisions.

    And, thanks for pointing out the ‘Screen Options’ settings. I had no idea they were different for each page. (This might be a great option to have in the Writing settings area… since it’s a big deal/great feature for every one who uses wordpress; and it’s hidden by default.)

    This in your wp-config.php file will save one revision

    define('WP_POST_REVISIONS', 1);
    Thread Starter dankelly613

    (@dankelly613)

    Sweet! Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Where do Page/Post ID's come from?’ is closed to new replies.