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 have a dummy install of .95 that I use to create my basic build of MODx where I have installed all my snippets, tv’s, chunks, etc. that I will be using as my base install for all websites I build for clients.

    I have been adding/deleting documents and folders over time in testing my install. Right now when I add a document I am in the 500’s as a document number.

    My question is how do I purge the document numbers so they will get back down to "1" as in the initial install?

    I don’t want each new site to start at document number 500+

    Sincerely,

    Ken Roberts
      • 25663 MODX Staff
      • 12,272 Posts
      Do an export of the DB, and manually reset the value of the index on any content page.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 22303 MODX Staff
        • 10,725 Posts
        All you have to do is make sure the database tables are empty (or at least do not contain records you want anymore) and then set the auto_increment value back to 1 for the table you want the lower value keys in. This can be done from the phpMyAdmin interface. Also, issuing a truncate on a table will both empty all the records and reset the auto_increment count for you.
          • 21136
          • 103 Posts
          Where do I find the auto_incrament?

          I cannot find this.

          Thanks smiley

          Ken Roberts
            • 22303 MODX Staff
            • 10,725 Posts
            Like I said, it’s a part of the MySQL database table structure definition. You can access and modify it through the MySQL client, or if you have phpMyAdmin, it will be much easier. In phpMyAdmin, it can be done by clicking on a table name, then going to the Operations tab...