Home » Labs » Working code for automatically empty WordPress trash  

Working code for automatically empty WordPress trash


Filed under Labs

If you are using WordPress content management system (CMS) and you wish to keep your trash folder always clean then here is the code which will automatically done above job.

Place below code within the wp-config.php file in the root directory of your WordPress install and it will Automatically empty trash every 7 days.

 
define('EMPTY_TRASH_DAYS', 7 ); // Change Integer according to interval dates

Posts you may like: