WordPress.org

Ready to get started?Download WordPress

Forums

Start post id numbering with three-digits? (6 posts)

  1. neononcon
    Member
    Posted 4 years ago #

    How can we make the post ids start at 100 (three digits)?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    May I ask why? What do you intend to with with these ids?

  3. neononcon
    Member
    Posted 4 years ago #

    for example, if you are a journalist and need 3 digit numbers at the end of the url in order to be recognized by news search engines. Either way, there are many reasons why one might want to do this.

    So how can we do it?

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    The post ids are generated by the MySql database, so short of publishing 100 drafts/revisions and then deleting them, I don't know of any safe way to do this at the post creation point.

    I was wondering if you just wanted to these ids for something visual or non-critical. But if they're intended to be part of the urls, I can't think of a way to do it. Sorry. :-(

  5. MichaelH
    Member
    Posted 4 years ago #

    Maybe this via phpMyAdmin. Backup your database before attempting:

    ALTER TABLE wp_posts AUTO_INCREMENT = 100;
  6. Orin
    Member
    Posted 4 years ago #

    The code suggested by MichaelH worked well for me when I wanted to reset my _posts table ID after a number of annoying revisions (when I thought I had revisions disabled). I did, of course, back up the table beforehand. Thanks for the help!

Topic Closed

This topic has been closed to new replies.

About this Topic