We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30399
    • 23 Posts
    Is there a way to initialise MODx, i.e. press one button and delete all the pages? I am practising importing HTML pages (generated by PHP) and need to experiment a bit which means multiple imports until I get everything set-up correctly, e.g. the site structure. It would be a pain to have to delete them by hand or re-instal to get a clean MODx.
      • 3749
      • 24,544 Posts
      If you go into PhpMyAdmin, select the modx_site_content table and "Empty" it, you’ll delete all pages. If you want to save some, you can drop individual records in that table.


        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 16183
        • 1,390 Posts
        Or...use the Doc Manager Module..

        1. Modules > Doc Manager > Other Properties >

        2. Under Miscellaneous Document Settings (available settings) in the drop down choose Delete/Undelete

        3. Select Delete using the radio buttons

        4. Specify a Range of Document IDs

        5. Click submit

        OK, not exactly one click...But if you’d rather not dabble with the db...You will also have to purge the deleted documents. Good thing with this method, if you change your mind you can always undelete the resources (documents).

        cheers/k
          • 20413
          • 2,877 Posts
          Pre-installed Doc Manager module let you delete multiple docs at the same time, then you need to click on the trash bin above the site tree, to purge them.
          But this wouldn’t reset the document ID’s as BobRay’s method would.

          //@kongondo LOL! laugh
            @hawproductions | http://mrhaw.com/

            Infograph: MODX Advanced Install in 7 steps:
            http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

            Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
            http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
            • 10487 MODX Staff
            • 1,535 Posts
            Pre-installed Doc Manager module let you delete multiple docs at the same time, then you need to click on the trash bin above the site tree, to purge them.
            Sounds like I need to add an extra option to DocManager - ’delete, purge, and truncate’ smiley Or something like that ... I’ll have to think of the best way to implement that.

            If you go into PhpMyAdmin, select the modx_site_content table and "Empty" it, you’ll delete all pages
            The problem with that is that you could potentially end up with orphaned records, e.g. TV values. If something is going to purge documents for good, then it needs to handle the associated data to that document as well.
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 30399
              • 23 Posts
              Thanks for your answers, it’s very helpful.