How to reset post IDs

I have a news site that grabs and posts things automatically, so I want to periodically reset the post ID number, just because I want to be able to keep the ID short and because I only keep posts that are about 3-day old. So, if you’re like me and for whatever reason you want to reset the post ID, this is how you’d do it:

  1. Go into your PHPMyAdmin and export the Post table, everything, then Drop it (delete it).
  2. Search for this line “ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=this_number“; where “this_number” is the ID number for your next post.
  3. Change “this_number” to whatever number you want, just make sure you’re not gonna have duplicate post IDs when you let it loose.
  4. Import your corrected Post table into your database.

Good luck.

Tweet This Post

SocialTwist Tell-a-Friend

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

blog comments powered by Disqus

Free Email Subscription

Poll

21 Free Random Links

Have a new site and want to show off and get linked? Send us an email and we'll link it here for free.