How To Truly Delete Pages in MODx
By Angsuman Chakraborty, Gaea News NetworkSunday, December 16, 2007
MODx is an excellent AJAX enabled content management system, which is leagues ahead of Joomla / Mambo. One of the features of MODx is that pages aren’t fully deleted. They are marked as deleted (displayed as strike-through items) and they are not displayed on the web. However they still remain in the database. This is a great feature to prevent accidental deletion. However sometimes you really need to delete pages to reduce the clutter and prevent conflicting aliases. Here is how you can truly (and irrevocably) delete pages from the database.
You will need to login to mysql using mysql command line or phpMyAdmin.
Steps:
1. Find the id of the page you want to delete (provided within bracket).
2. Execute the query:
delete from modx_site_content where id = your_id
Note: You can also delete using the page title:
delete from modx_site_content where pageTitle = ‘page_title‘;
Disclaimer: Use the above at your own risk. You may lose data if you are careless.
Jay (see comment below) gave a much better and simpler solution. In his words - “It may not be obvious from the manager but you can easily purge deleted documents (permanently) from the tree by clicking on the Garbage Can icon in the manager.”
Tags: phpMyAdmin, Tree
December 17, 2007: 7:42 am
Glad to see that you are enjoying MODx. I have deployed dozens of sites using MODx since 0.9.2. It may not be obvious from the manager but you can easily purge deleted documents (permanently) from the tree by clicking on the Garbage Can icon in the manager. This is the purge command and all deleted documents will no longer be in the tree and cannot be undone. Alot easier than using phpMyAdmin. Hope this helps, |
Angsuman Chakraborty