How to reset the post ID increment

I also happened to me once, I only had like 10 real post, so what I did was to go to phpMyAdmin, make sure your that on my wp_posts and wp_posts_meta tables are only information about the 10 real posts IDs, from the mysite/wp-admin/export.php I exported all the posts (10 of them), I run the following SQL query on phpMyAdmin.

DELETE FROM wp_posts;
DELETE FROM wp_post_meta;

TRUNCATE TABLE wp_posts;
TRUNCATE TABLE wp_post_meta;

And finally, I import again the 10 posts, after that the ID was bad to normally, mine was only around 10000 tho, but it should work nonetheless.

Leave a Comment