• Hey!

    How does the system with the generation of article oder product IDs work?

    So if I create an article, its ID is e.g. 5555
    If I create afterwards a product, its ID becomes 5556
    But if I create another article right after that, its IDs is going to be 5560
    Where are the other 4 IDs?

    And if I wait a couple of hours, days, etc. the ID of a new article is going to be e.g. 5943.

    What happened to the other numbers?

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • They are from an auto-incrementing database field called (normally) wp_posts. Note that the wp_ part may be different depending on the prefix that’s set in your wp-config.php file.

    That table holds all post types. That is everything including posts, pages, custom post types, revisions, drafts, etc. If you create a new item that has an ID of 5555 and the system creates a revision for it, taht revision takes the ID of 5556. Create a new post after that and it will be 5557. Create a page after that and it will be 5558. Create a new post and it’s 5559, and so on.

    If you want to see what all of the ID’s are that you see “missing”, then look at the database table ad you’ll see exactly what they are.

Viewing 1 replies (of 1 total)

The topic ‘How are the article IDs generated?’ is closed to new replies.