Moderator
James Huff
(@macmanx)
Volunteer Moderator
Lower the post IDs back to the way they should be. The next post will always be given an ID which is one unit higher than the current highest ID.
So, if you have four posts with the IDs 1, 2, 3, and 4, then the ID for the next post will be 5. But, if you have four posts with the IDs 1, 2, 3, and 400, then the ID for the next post will be 401.
Thread Starter
gaebe
(@gaebe)
I’ve checked all over. And I have entries numbered from 1-76. When I tried to post a new entry, the number jumps to 427. When I deleted the entry and posted a new one, that one is numbered 428
What’s your autoincrement
value set to on the table? Should be in the bottom left when looking at the wp_posts
table’s structure in phpMyAdmin.
Thread Starter
gaebe
(@gaebe)
Is this what you mean? I can’t seem to find the autoincrement.
Row Statistics:
Statements Value
Format dynamic
Rows 77
Row length ø 1,784
Row size ø 1,864 Bytes
Next Autoindex 429
Creation Dec 17, 2005 at 05:31 PM
Last update Dec 17, 2005 at 06:10 PM
Moderator
James Huff
(@macmanx)
Volunteer Moderator
Try changing “Next Autoindex” to 77 (or 78 if you already have a 77, etc).
Thread Starter
gaebe
(@gaebe)
Can you tell me how to do that? thanks.
Moderator
James Huff
(@macmanx)
Volunteer Moderator
Can you access the database with phpmyadmin? If so, edit that row, and change the “Next Autoindex” value to 77 (or 78 if you already have a 77, etc).
Yes, it’s displayed as “Next Autoindex”. My apologies.
Anyway, you can’t just set the autoindex to the number of row that you have + 1. You need to see what IDs are in use. Click the “SQL” tab and put this in there:
SELECT * FROM wp_posts ORDER BY ID DESC
What’s the ID that’s listed first? i.e. the highest post ID? You’ll want to set your “Next Autoindex” to that + 1. So if it’s 77, set it to 78. If it’s 105, set it to 106.
To change it, click the “Operations” tag and then down at the bottom, edit the value for auto_increment
.
Thread Starter
gaebe
(@gaebe)
I did all this. The latest entry number was 76. But this is what i get when I tried to change the auto_increment to 77.
Your SQL query has been executed successfully
SQL query:
ALTER TABLE wp_posts
PACK_KEYS =1 CHECKSUM =0 DELAY_KEY_WRITE =0 AUTO_INCREMENT =429
[ Edit ] [ Create PHP Code ]
Thread Starter
gaebe
(@gaebe)
ok, i’ve got it, it works fine now. thanks a lot. =)
Thanks
I found this topic very useful. 😉
Rob
Hey, could you help on this. I am trying to do exactly the same thing as gaebe. I have followed the instructions and when i go to “Operations” tab and change the value in the auto_increment field and click ‘go’ it says:
SQL query:
ALTER TABLE wp_posts
PACK_KEYS =1 CHECKSUM =1 DELAY_KEY_WRITE =1 AUTO_INCREMENT =18
the field stays as it was. I tested by publishing a new post to see if the would be 1 or 18. it was 18.
i only have one post – deleted the rest and am now ready to start blogging.
http://blog.rieder.co.uk – a theme called fufu
Anyway, what could i be doing wrong? Any ideas?
Rob
I tried this and I got this:
ALTER TABLE wp_posts
AUTO_INCREMENT =565
And it work and now I am starting at 565.