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.
Add a comment
|
1 Answer
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? Commented Aug 26, 2014 at 14:02
-
-
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. Commented Aug 26, 2014 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 ECommented Aug 26, 2014 at 14:12
-
1It 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. Commented Aug 26, 2014 at 14:15