So I have 2 blog posts so far and the first one has ID 8 and second one has ID 12. How exactly does WordPress count those IDs? What if I want to change ID 8 and ID 12 to ID 1 and ID 2? I have some knowledge about MySQL and I know that post IDs are related to the wp_posts table of the DataBase. How to edit the IDs? I have WordPress 3.9.2 and access to phpMyAdmin.


Don't change the Post ID.

Wordpress uses serialized data, and id's have deep linking within the database.

  • But I have just 2 posts. It's almost a fresh install. I don't want to re-install it because my settings and posts will be lost. Isn't there any way to change just 2 post IDs? – PowerUser Aug 26 '14 at 14:02
  • Why do you want to change the post ID? – Howard E Aug 26 '14 at 14:04
  • Well, jumping from 1 to 8 and then from 8 to 12 for sequential posts doesn't look good to me. And since I'm using this kind of custom permalinks: example.com /archives/%year%/%monthnum%/%day%/%postname%/%post_id%/ the post id is shown in the URI. – PowerUser Aug 26 '14 at 14:08
  • Posts are not sequential. Everything in wordpress is a post. Every revision, virtually every action is a post, just a different post type. Just title the post "post1" and use the permalink /%postname%/ – Howard E Aug 26 '14 at 14:12
  • 1
    It will be nearly impossible to keep the post IDs sequential for blog posts on your site as many other areas make use of the wp_posts table. Media, custom post types, pages, etc... All of those will affect the current post_id in the wp_posts table. – hereswhatidid Aug 26 '14 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.