[wp-hackers] Trash Emptying Too Fast

Andrew Nacin wp at andrewnacin.com
Wed Sep 29 05:02:31 UTC 2010

On Tue, Sep 28, 2010 at 11:49 PM, David Morris <dvmorris at gmail.com> wrote:

> I had some bloggers complain that after upgrading to 3.0 their blog
> post and comment trash cans are getting emptied faster than 30 days.
> We have only been live on the 3.0 platform for 5 days, so I just
> wanted to see if anyone out there has experienced any issues like
> this. Here is a quote from one blogger:
> - We noticed the trash on blogs is getting emptied very quickly,
> making it difficult to monitor blog comments.
> - I'm pretty sure that before the v.3.0.1 upgrade, trash got emptied
> no sooner than 30 days after an item (post or comment) was dumped
> there.
> Any ideas why they might be experiencing early trash emptying like
> this? I first suspected that an mu-plugin was the culprit, but I don't
> see any code in our entire source tree that references
> EMPTY_TRASH_DAYS other than the core WP code that sets it to 30.

Not a clue at all. wp_scheduled_delete() in wp-includes/functions.php
handles the deletion process.

If you var_dump( EMPTY_TRASH_DAYS ), you should know what it is set to, in
case a plugin or something is modifying it. Otherwise, there is no filter or
anything of the sort to modify it in that function.

More information about the wp-hackers mailing list