Title: Last post ID in Database ?
Last modified: August 20, 2016

---

# Last post ID in Database ?

 *  [PuNK DeSi](https://wordpress.org/support/users/ades_ting/)
 * (@ades_ting)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/last-post-id-in-database/)
 * when we create new post it pick a post ID
 * I want to know Where last Post Id saved in database?
 * I hv only few posts
    Last post ID was 60 & instead of New Post ID start from 
   61 or 62 it jump to 592 !
 * So where the other Posts / Post Ids gone ? I want to check what is wrong in database
   or post system…
 * Thanks !

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [nsathees](https://wordpress.org/support/users/nsathees/)
 * (@nsathees)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/last-post-id-in-database/#post-2206580)
 * if you post and delete the IDS are used up. Re installing the WordPress will 
   not help to rearrange the post id. You will have to turncate the tables before
   re installing.
 * By the way why are you worrying about those ids?
 * If you are developing themes you can all ways catch the last post ID of get them
   with other variables!
 *  [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/last-post-id-in-database/#post-2206596)
 * Punk, remember that everything in WP gets an ID. An uploaded image, an autosave,
   a revision, etc.
 *  Thread Starter [PuNK DeSi](https://wordpress.org/support/users/ades_ting/)
 * (@ades_ting)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/last-post-id-in-database/#post-2206616)
 * thankx nsathees & Roy
 * yea i know about autosave, attachments, revisions IDs IN database
 * in posts table my last ID was 62(including drafts & attachments)
 * I use TDOMF post submit system
    & recently when i got 1 submission after post
   60 Its ID was 592
 * so I got surprised where other posts with IDs from 62 to 591 gone !
 *  [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/last-post-id-in-database/#post-2206626)
 * Just a thought, but perhaps you can try that by manually editing the edit post
   url. Just go to your posts, click ‘edit’ and change the ID to 63 or 500 or whatever.
   I’m not sure if it works, but it could.
 *  Thread Starter [PuNK DeSi](https://wordpress.org/support/users/ades_ting/)
 * (@ades_ting)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/last-post-id-in-database/#post-2206704)
 * yes @ Roy : Exactly
 * I did that already, I changed POST ID 592 to 62 & also url its working fine
 * But new Posts coming with ID series 593, 594 instead of 63,64
 * I want to fix this so new posts ID come into proper series
 * that why i want to know from where WP picks last post IF from wordpress as my
   last post ID in this case is 62 but new post starting from 594 !
 *  Thread Starter [PuNK DeSi](https://wordpress.org/support/users/ades_ting/)
 * (@ades_ting)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/last-post-id-in-database/#post-2206744)
 * If My new post ID coming 595 only 60 posts on databse & last post ID is 62
 * I want to know where last ID (594) saved in DB so new ID comes next :<
 *  [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/last-post-id-in-database/#post-2206751)
 * Try the wp_posts table.
 * > I changed POST ID 592 to 62 & also url its working fine
 * And what were the results? Images? Revisions? Autosaves? Something else? That
   tip was to give you an idea of what these ID’s were assigned to.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Last post ID in Database ?’ is closed to new replies.

## Tags

 * [$post->id](https://wordpress.org/support/topic-tag/post-id/)
 * [new-post](https://wordpress.org/support/topic-tag/new-post/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [Roy](https://wordpress.org/support/users/gangleri/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/last-post-id-in-database/#post-2206751)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
