How to empty trash automatically every specified number of days
If there are some things I must have wished to be automated while using my wordpress blog, this is surely one of them. WordPress is a nice CMS platform, and thus gives us the opportunity to toy around with the theme file. Here is a simple trick that can automate the process of emptying your trash post on a daily basis or any specified number of days you set it to
How to automatically empty trash on a daily basis
The trick to this is simple,
Locate your wp-config.php file of your wordpress blog which can be found in the root folder of your wordpress blog throgh your cPanel File Manager.
Locate your wp-config.php file of your wordpress blog which can be found in the root folder of your wordpress blog throgh your cPanel File Manager.
Edit this file and simply add this code in the very last line
define('EMPTY_TRASH_DAYS', 1);
Replace 1 in the code with a number you wish, it denotes the number of days. If left as 1 in the code above, the trash posts would automatically be emptied everyday.
I hope this WordPress Tip was useful.
No comments