WordPress 2.9 bought with itself a great new feature called Trash. Every time a post or comment is deleted it is deposited in the Trash from where it can be recovered later if needed. Somewhat like Recycle Bin in Windows!. To remove the posts and comments permanently, you have to delete them permanently from Trash.
But, If you are one like me who use to automate tasks then here is a simple hack with which the Trash will be cleaned automatically in X number of days. Here is how you can enable it.
Go to the root of your wordpress directory and look for a file named wp-config.php. We need to add a line of code to this file to enable automatic deletion. Open this file in a text editor and paste the following line of code. Save the file and upload it to the server.
define(‘EMPTY_TRASH_DAYS’, 10 );
You can change the number of days from 10 to any number of days you want for the automatic deletion to take place.
Related:
- WordPress 2.8.1 Final Available, Upgrade Now!
- Adding Command Prompt in the Right Button in Explorer
- Adding a ‘Settings’ option under Tray Menu in Google Talk
- WordPress 2.8 is Here!
- How to Recover Username and Password from Opera’s Wand File
- How to Enable Visual Tab Switcher in Firefox 3.6 [Video]
- Securing your WordPress Blog
- How to preview Illustrator .AI files as thumbnails in Windows Explorer
