WordPress Empty Trash Automatically

  • Avinash
  • 0
  • Jul 11, 2011
  • Web Development

In order to make sure that your wordpress’ trashed posts and pages gets deleted after some duration.

WordPress has left a scope for this. By default this duration is set to 30 days. But still we can declare a another time or can disable this features also.

In order to specify the trash empty time please follow below steps:

First open your wp-config.php file.
Place below code in that file

//empty WordPress trash once a week define('EMPTY_TRASH_DAYS', 7);
//empty WordPress trash once a week
define('EMPTY_TRASH_DAYS', 7);

To disable this features place below code in your wp-config.php file, that mean wordpress will not clear your trash by its own.

//Disable Empty Trash Functionality define('EMPTY_TRASH_DAYS', 0);
//Disable Empty Trash Functionality
define('EMPTY_TRASH_DAYS', 0);

Related Posts

Written by Avinash

Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.

View all posts by: