We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21136
    • 103 Posts
    Hello smiley

    I am in the process of setting up a default staging site and I want to know how to set the ID back to One "1".

    I am able to login to the database via SQLyog or Phpadmin. Can someone tell me the exact steps in altering the tables to set the increment count back to One "1" please smiley

    Regards,

    Ken Roberts
      • 27708 MODX Staff
      • 2,502 Posts
      This really isn’t a question related to MODx in addition it is not a good idea because any Template Variables you have are tied to the document id that is based on the autoincrement number that is the id.

      If you have no template variables you could go into phpMyadmin and edit away.
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 16034
        • 107 Posts
        To reset the auto_increment value, use this command:
        ALTER TABLE table_name AUTO_INCREMENT=1


        /Kleist
        PS: Found by googling for mysql reset auto-increment: http://dev.mysql.com/doc/en/example-AUTO_INCREMENT.html
          MODx snippet-glossary 101:
          Ditto = Content Lister -- Wayfinder == Menu Builder -- Jot = Comment Control