Is there any advantage to performance (or otherwise) for emptying comment spam from within wp-admin on any regular basis?

I daily have been making sure that the comment spam queue is emptied out, but is this serving any purpose?

  • 3
    I'm sure somebody can give a more in-depth answer but the only reason to empty spam is to keep your database clean and make it easier for you to find comments that aren't spam. Each time comments load it has to query the comment table and find approved comments so the larger the table the longer the query takes even though it may only be a couple miliseconds more or less.
    – Howdy_McGee
    Oct 15, 2014 at 19:24

1 Answer 1


There is definitely a performance advantage in keeping your comment spam to a minimum. If you have a lot of comments, the query time can get pretty out of control.

To make it easier, you should install Akismet if you haven't already. Akismet will automatically detect spam comments and move them to WordPress spam section. You can then delete all the spam comments in one click, OR you can change the default empty trash days from 30 days to something much sooner.

If so, you'll want to add the following to your wp-config.php file:

define( 'EMPTY_TRASH_DAYS', 1 );

And if you're brave and would like to just delete spam comments (and everything else in the trash) without sending them to the trash, you can add the following to your wp-config.php file:

define( 'EMPTY_TRASH_DAYS', 0 );
  • 2
    Keep in mind this setting will affect more than just comments. (Pages, posts, comments, custom post types, etc...) Oct 15, 2014 at 19:35
  • Exactly. This is very true. Oct 15, 2014 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.