Delete spam comments after three (3) days

Published by JanR on

How to change Akismet interval to three days instead of 15 days for deleting spam comments.

Add to your theme’s functions.php or site-specific plugin file:

add_filter( 'akismet_delete_comment_interval', 'custom_set_delete_interval' );
function custom_set_delete_interval() {
        return 3;
}

This changes Akismet’s interval to 3 days, after which comments held as spam are deleted.


Leave a Reply

Your email address will not be published. Required fields are marked *

39 queries, took 0.140 seconds running PHP version 7.2.15