WordPress tutorials: Automatically empty trash

Wpsnipp – Automatically empty trash.The most frustrating problem every blog owner faces is “SPAM comments”. Dealing with numerous SPAM comments is really a tedious job. .Place this code within the wp-config.php file in the root directory of your wordpress install and it will Automatically empty trash every 3 days.

 

 

To speed up the task and reduce personal intervention, there is a small hack which allows us to empty the trash automatically without having to do it manually each time.

  1. Login to your FTP and Download wp-config.php file and edit it.
  2. Add below code in it
  3. Save the file and upload it back.


define('EMPTY_TRASH_DAYS', 3 );

Leave a comment