trash-iconWordPress has an inbuilt trash system which keeps your posts, pages, comments in trash for 30 days by default. However, WordPress has a way to change this default 30 days time period. We can even disable this feature such that WordPress does not empties the trash automatically.

In order to change this setting, follow the steps –

Open the wp-config.php , which is placed in the root folder.

Place the following code as required.

//empty WordPress trash once a fortnight
define('EMPTY_TRASH_DAYS', 15);

To disable this feature, such that WordPress does not empty trash automatically, place the following code in the wp-config.php

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


Hope that helps.


Stay Digified!!
Sachin Khosla

Share this post: