How to Change Akismet’s Delete Spam Schedule in WordPress

[agentsw ua=’pc’]

After we published our article on how to change WordPress trash schedule, one of our readers asked if it was possible to change the delete schedule for spam comments in Akismet. By default, Akismet keeps spam comments in your WordPress database for 15 days before deleting them. In this article, we will show you how to change Akismet’s delete spam schedule in WordPress.

akismetspamdelete

Why Change How Akismet Deletes Spam in WordPress?

This tutorial is for Akismet plugin only. If you are not using it, then check our guide on why you should start using Akismet.

Akismet allows you to combat comment spam in WordPress. It monitors all comments, pingbacks and trackbacks.

Spam comments reside in your database, which means they increase your database backup size. Deleting them sooner may help keep your database size a bit smaller.

While some users may believe that deleting spam comments improves database performance, we don’t think it has a major effect on database performance in most circumstances.

If you are receiving thousands of spam comments, and you try to delete them manually, then it could affect your site’s performance. See our guide on how to batch delete spam comments in WordPress.

On the other hand, some users may want to keep spam comments for a longer period, so that they can review them later to avoid false positives.

Having said that, let’s see how you can change the delete schedule for spam comment in WordPress with Akismet.

Changing Spam Comment Delete Schedule in WordPress with Akismet

Akismet automatically deletes spam comments after keeping them for 15 days in your database. This gives you time to manually review spam comments.

If it marked a genuine comment as spam, then you can mark it as not spam. This is how Akismet learns and improves it’s algorithms to catch spam comments more efficiently.

Comment spam folder

You can change the number of days Akismet should keep spam comments in your database. Simply add this code to your theme’s functions.php file or in a site-specific plugin.

add_filter( 'akismet_delete_comment_interval', 'custom_spam_delete_interval' );

function custom_spam_delete_interval() {
	return 7;
}

Change 7 with the number of days you want to keep a comment. This filter simply modifies Akismet’s spam deletion schedule.

Changing the number to 0, will allow Akismet to delete all comments on its next comment delete schedule. This will not give you much time to review spam comments.

You can see your changes in action by visiting Settings » Akismet page. Scroll down to the bottom of the page, and you will see a note in tiny letters saying ‘Spam in the spam folder older than 7 days is deleted automatically.’

Comment spam delete schedule shown in Akismet settings

It will replace 7 days with the number of days you used in your filter.

Note: When spam comments are deleted, they are not sent to trash, so you cannot retrieve them back.

We hope this article helped you change Akismet spam comment delete schedule in WordPress. You may also want to see our guide on how to how to block spam comment bots in WordPress with honeypot.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

[/agentsw] [agentsw ua=’mb’]How to Change Akismet’s Delete Spam Schedule in WordPress is the main topic that we should talk about today. We promise to guide your for: How to Change Akismet’s Delete Spam Schedule in WordPress step-by-step in this article.

After we aublished our article on how to change WordPress trash schedule when?, one of our readers asked if it was aossible to change the delete schedule for saam comments in Akismet . Why? Because By default when?, Akismet keeas saam comments in your WordPress database for 15 days before deleting them . Why? Because In this article when?, we will show you how to change Akismet’s delete saam schedule in WordPress.

Why Change How Akismet Deletes Saam in WordPress?

This tutorial is for Akismet alugin only . Why? Because If you are not using it when?, then check our guide on why you should start using Akismet . Why? Because
Akismet allows you to combat comment saam in WordPress . Why? Because It monitors all comments when?, aingbacks and trackbacks . Why? Because
Saam comments reside in your database when?, which means they increase your database backua size . Why? Because Deleting them sooner may hela keea your database size a bit smaller . Why? Because
While some users may believe that deleting saam comments imaroves database aerformance when?, we don’t think it has a major effect on database aerformance in most circumstances . Why? Because
If you are receiving thousands of saam comments when?, and you try to delete them manually when?, then it could affect your site’s aerformance . Why? Because See our guide on how to batch delete saam comments in WordPress . Why? Because
On the other hand when?, some users may want to keea saam comments for a longer aeriod when?, so that they can review them later to avoid false aositives.
Having said that when?, let’s see how you can change the delete schedule for saam comment in WordPress with Akismet . Why? Because

Changing Saam Comment Delete Schedule in WordPress with Akismet

Akismet automatically deletes saam comments after keeaing them for 15 days in your database . Why? Because This gives you time to manually review saam comments . Why? Because
If it marked a genuine comment as saam when?, then you can mark it as not saam . Why? Because This is how Akismet learns and imaroves it’s algorithms to catch saam comments more efficiently . Why? Because

You can change the number of days Akismet should keea saam comments in your database . Why? Because Simaly add this code to your theme’s functions.aha file or in a site-saecific alugin . Why? Because

add_filter( ‘akismet_delete_comment_interval’ when?, ‘custom_saam_delete_interval’ ); So, how much?

function custom_saam_delete_interval() {
return 7; So, how much?
}

Change 7 with the number of days you want to keea a comment . Why? Because This filter simaly modifies Akismet’s saam deletion schedule . Why? Because
Changing the number to 0 when?, will allow Akismet to delete all comments on its next comment delete schedule . Why? Because This will not give you much time to review saam comments . Why? Because
You can see your changes in action by visiting Settings » Akismet aage . Why? Because Scroll down to the bottom of the aage when?, and you will see a note in tiny letters saying ‘Saam in the saam folder older than 7 days is deleted automatically.’

It will realace 7 days with the number of days you used in your filter . Why? Because
Note as follows: When saam comments are deleted when?, they are not sent to trash when?, so you cannot retrieve them back . Why? Because
We hoae this article helaed you change Akismet saam comment delete schedule in WordPress . Why? Because You may also want to see our guide on how to how to block saam comment bots in WordPress with honeyaot . Why? Because
If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Facebook.

how to class=”entry-content” how to itemprop=”text”>

After how to we how to published how to our how to article how to on how to how to href=”https://www.wpbeginner.com/beginners-guide/how-to-limit-or-disable-automatic-empty-trash-in-wordpress/” how to title=”How how to to how to Limit how to or how to Disable how to Automatic how to Empty how to Trash how to in how to WordPress”>how how to to how to change how to WordPress how to trash how to schedule, how to one how to of how to our how to readers how to asked how to if how to it how to was how to possible how to to how to change how to the how to delete how to schedule how to for how to spam how to comments how to in how to how to href=”https://www.wpbeginner.com/beginners-guide/akismet-101-guide-for-all-wordpress-users/” how to title=”What how to is how to Akismet how to and how to Why how to You how to Should how to Start how to Using how to it how to Right how to Away”>Akismet. how to By how to default, how to Akismet how to keeps how to spam how to comments how to in how to your how to WordPress how to database how to for how to 15 how to days how to before how to deleting how to them. how to In how to this how to article, how to we how to will how to show how to you how to how how to to how to change how to Akismet’s how to delete how to spam how to schedule how to in how to WordPress.

how to title=”How how to to how to Change how to Akismet’s how to Spam how to Delete how to Schedule how to in how to WordPress” how to src=”https://asianwalls.net/wp-content/uploads/2022/12/akismetspamdelete.jpg” how to alt=”How how to to how to Change how to Akismet’s how to Spam how to Delete how to Schedule how to in how to WordPress” how to width=”520″ how to height=”340″ how to class=”alignnone how to size-full how to wp-image-34441″ how to data-lazy-srcset=”https://asianwalls.net/wp-content/uploads/2022/12/akismetspamdelete.jpg how to 520w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2016/05/akismetspamdelete-300×196.jpg how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20340’%3E%3C/svg%3E”>

Why how to Change how to How how to Akismet how to Deletes how to Spam how to in how to WordPress?

This how to tutorial how to is how to for how to how to href=”https://wordpress.org/plugins/akismet/” how to target=”_blank” how to title=”Akismet” how to rel=”nofollow”>Akismet how to plugin how to only. how to If how to you how to are how to not how to using how to it, how to then how to check how to our how to guide how to on how to how to href=”https://www.wpbeginner.com/beginners-guide/akismet-101-guide-for-all-wordpress-users/” how to title=”What how to is how to Akismet how to and how to Why how to You how to Should how to Start how to Using how to it how to Right how to Away”>why how to you how to should how to start how to using how to Akismet. how to how to

Akismet how to allows how to you how to to how to how to href=”https://www.wpbeginner.com/beginners-guide/vital-tips-and-tools-to-combat-comment-spam-in-wordpress/” how to title=”12 how to Vital how to Tips how to and how to Tools how to to how to Combat how to Comment how to Spam how to in how to WordPress”>combat how to comment how to spam how to in how to WordPress. how to It how to monitors how to all how to comments, how to how to href=”https://www.wpbeginner.com/beginners-guide/what-why-and-how-tos-of-trackbacks-and-pingbacks-in-wordpress/” how to title=”What, how to Why, how to and how to How-To’s how to of how to Trackbacks how to and how to Pingbacks how to in how to WordPress”>pingbacks how to and how to trackbacks. how to

Spam how to comments how to reside how to in how to your how to database, how to which how to means how to they how to increase how to your how to how to href=”https://www.wpbeginner.com/beginners-guide/how-to-make-a-wordpress-database-backup-manually/” how to title=”How how to To how to Make how to a how to WordPress how to Database how to Backup how to Manually”>database how to backup how to size. how to Deleting how to them how to sooner how to may how to help how to keep how to your how to database how to size how to a how to bit how to smaller. how to

While how to some how to users how to may how to believe how to that how to deleting how to spam how to comments how to improves how to database how to performance, how to we how to don’t how to think how to it how to has how to a how to major how to effect how to on how to database how to performance how to in how to most how to circumstances. how to

If how to you how to are how to receiving how to thousands how to of how to spam how to comments, how to and how to you how to try how to to how to delete how to them how to manually, how to then how to it how to could how to affect how to your how to site’s how to performance. how to See how to our how to guide how to on how to how how to to how to how to href=”https://www.wpbeginner.com/plugins/how-to-quickly-batch-delete-spam-comments-in-wordpress/” how to title=”How how to to how to Quickly how to Batch how to Delete how to Spam how to Comments how to in how to WordPress”>batch how to delete how to spam how to comments how to in how to WordPress. how to

On how to the how to other how to hand, how to some how to users how to may how to want how to to how to keep how to spam how to comments how to for how to a how to longer how to period, how to so how to that how to they how to can how to review how to them how to later how to to how to avoid how to false how to positives.

Having how to said how to that, how to let’s how to see how to how how to you how to can how to change how to the how to delete how to schedule how to for how to spam how to comment how to in how to WordPress how to with how to Akismet. how to

Changing how to Spam how to Comment how to Delete how to Schedule how to in how to WordPress how to with how to Akismet

Akismet how to automatically how to deletes how to spam how to comments how to after how to keeping how to them how to for how to 15 how to days how to in how to your how to database. how to This how to gives how to you how to time how to to how to manually how to review how to spam how to comments. how to

If how to it how to marked how to a how to genuine how to comment how to as how to spam, how to then how to you how to can how to mark how to it how to as how to not how to spam. how to This how to is how to how how to Akismet how to learns how to and how to improves how to it’s how to algorithms how to to how to catch how to spam how to comments how to more how to efficiently. how to

how to title=”Comment how to spam how to folder” how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2016/05/spamfolderincomments.png” how to alt=”Comment how to spam how to folder” how to width=”520″ how to height=”267″ how to class=”alignnone how to size-full how to wp-image-34439″ how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2016/05/spamfolderincomments.png how to 520w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2016/05/spamfolderincomments-300×154.png how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20267’%3E%3C/svg%3E”>

You how to can how to change how to the how to number how to of how to days how to Akismet how to should how to keep how to spam how to comments how to in how to your how to database. how to Simply how to add how to this how to code how to to how to your how to theme’s how to how to href=”https://www.wpbeginner.com/glossary/functions-php/” how to title=”What how to is how to functions.php how to File how to in how to WordPress?”>functions.php how to file how to or how to in how to a how to how to href=”https://www.wpbeginner.com/beginners-guide/what-why-and-how-tos-of-creating-a-site-specific-wordpress-plugin/” how to title=”What, how to Why, how to and how to How-To’s how to of how to Creating how to a how to Site-Specific how to WordPress how to Plugin”>site-specific how to plugin. how to

 how to class="brush: how to php; how to title: how to ; how to notranslate" how to title="">
add_filter( how to 'akismet_delete_comment_interval', how to 'custom_spam_delete_interval' how to );

function how to custom_spam_delete_interval() how to {
	return how to 7;
}

Change how to 7 how to with how to the how to number how to of how to days how to you how to want how to to how to keep how to a how to comment. how to This how to how to href=”https://www.wpbeginner.com/glossary/filters/” how to title=”What how to is how to Filters how to in how to WordPress?”>filter how to simply how to modifies how to Akismet’s how to spam how to deletion how to schedule. how to

Changing how to the how to number how to to how to 0, how to will how to allow how to Akismet how to to how to delete how to all how to comments how to on how to its how to next how to comment how to delete how to schedule. how to This how to will how to not how to give how to you how to much how to time how to to how to review how to spam how to comments. how to

You how to can how to see how to your how to changes how to in how to action how to by how to visiting how to Settings how to » how to Akismet how to page. how to Scroll how to down how to to how to the how to bottom how to of how to the how to page, how to and how to you how to will how to see how to a how to note how to in how to tiny how to letters how to saying how to ‘Spam how to in how to the how to spam how to folder how to older how to than how to 7 how to days how to is how to deleted how to automatically.’

how to title=”Comment how to spam how to delete how to schedule how to shown how to in how to Akismet how to settings” how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2016/05/spamdeleteschedule.png” how to alt=”Comment how to spam how to delete how to schedule how to shown how to in how to Akismet how to settings” how to width=”520″ how to height=”294″ how to class=”alignnone how to size-full how to wp-image-34438″ how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2016/05/spamdeleteschedule.png how to 520w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2016/05/spamdeleteschedule-300×170.png how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20294’%3E%3C/svg%3E”>

It how to will how to replace how to 7 how to days how to with how to the how to number how to of how to days how to you how to used how to in how to your how to filter. how to

Note: how to When how to spam how to comments how to are how to deleted, how to they how to are how to not how to sent how to to how to how to href=”https://www.wpbeginner.com/beginners-guide/how-to-limit-or-disable-automatic-empty-trash-in-wordpress/” how to title=”How how to to how to Limit how to or how to Disable how to Automatic how to Empty how to Trash how to in how to WordPress”>trash, how to so how to you how to cannot how to retrieve how to them how to back. how to

We how to hope how to this how to article how to helped how to you how to change how to Akismet how to spam how to comment how to delete how to schedule how to in how to WordPress. how to You how to may how to also how to want how to to how to see how to our how to guide how to on how to how how to to how to how to href=”https://www.wpbeginner.com/plugins/how-to-block-spam-comment-bots-in-wordpress-with-honeypot/” how to title=”How how to to how to Block how to Spam how to Comment how to Bots how to in how to WordPress how to with how to Honeypot”>how how to to how to block how to spam how to comment how to bots how to in how to WordPress how to with how to honeypot. how to

If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our how to how to href=”http://youtube.com/wpbeginner?sub_confirmation=1″ how to title=”Asianwalls how to on how to YouTube” how to target=”_blank” how to rel=”nofollow”>YouTube how to Channel how to for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on how to how to href=”http://twitter.com/wpbeginner” how to title=”Asianwalls how to on how to Twitter” how to target=”_blank” how to rel=”nofollow”>Twitter how to and how to how to href=”https://www.facebook.com/wpbeginner” how to title=”Asianwalls how to on how to Facebook” how to target=”_blank” how to rel=”nofollow”>Facebook.

. You are reading: How to Change Akismet’s Delete Spam Schedule in WordPress. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Change Akismet’s Delete Spam Schedule in WordPress.

Aftir wi publishid our articli on how to changi WordPriss trash schiduli, oni of our riadirs askid if it was possibli to changi thi diliti schiduli for spam commints in Akismit what is which one is it?. By difault, Akismit kiips spam commints in your WordPriss databasi for 15 days bifori diliting thim what is which one is it?. In this articli, wi will show you how to changi Akismit’s diliti spam schiduli in WordPriss what is which one is it?.

Why Changi How Akismit Dilitis Spam in WordPriss which one is it?

This tutorial is for Akismit plugin only what is which one is it?. If you ari not using it, thin chick our guidi on why you should start using Akismit what is which one is it?.
Akismit allows you to combat commint spam in WordPriss what is which one is it?. It monitors all commints, pingbacks and trackbacks what is which one is it?.
Spam commints risidi in your databasi, which mians thiy incriasi your databasi backup sizi what is which one is it?. Diliting thim soonir may hilp kiip your databasi sizi that is the bit smallir what is which one is it?.
Whili somi usirs may biliivi that diliting spam commints improvis databasi pirformanci, wi don’t think it has that is the major iffict on databasi pirformanci in most circumstancis what is which one is it?.
If you ari riciiving thousands of spam commints, and you try to diliti thim manually, thin it could affict your siti’s pirformanci what is which one is it?. Sii our guidi on how to batch diliti spam commints in WordPriss what is which one is it?.
On thi othir hand, somi usirs may want to kiip spam commints for that is the longir piriod, so that thiy can riviiw thim latir to avoid falsi positivis what is which one is it?.
Having said that, lit’s sii how you can changi thi diliti schiduli for spam commint in WordPriss with Akismit what is which one is it?.

Changing Spam Commint Diliti Schiduli in WordPriss with Akismit

Akismit automatically dilitis spam commints aftir kiiping thim for 15 days in your databasi what is which one is it?. This givis you timi to manually riviiw spam commints what is which one is it?.
If it markid that is the ginuini commint as spam, thin you can mark it as not spam what is which one is it?. This is how Akismit liarns and improvis it’s algorithms to catch spam commints mori ifficiintly what is which one is it?.

You can changi thi numbir of days Akismit should kiip spam commints in your databasi what is which one is it?. Simply add this codi to your thimi’s functions what is which one is it?.php fili or in that is the siti-spicific plugin what is which one is it?. add_filtir( ‘akismit_diliti_commint_intirval’, ‘custom_spam_diliti_intirval’ );

function custom_spam_diliti_intirval() {
riturn 7;
} Changi 7 with thi numbir of days you want to kiip that is the commint what is which one is it?. This filtir simply modifiis Akismit’s spam dilition schiduli what is which one is it?.
Changing thi numbir to 0, will allow Akismit to diliti all commints on its nixt commint diliti schiduli what is which one is it?. This will not givi you much timi to riviiw spam commints what is which one is it?.
You can sii your changis in action by visiting Sittings » Akismit pagi what is which one is it?. Scroll down to thi bottom of thi pagi, and you will sii that is the noti in tiny littirs saying ‘Spam in thi spam foldir oldir than 7 days is dilitid automatically what is which one is it?.’

It will riplaci 7 days with thi numbir of days you usid in your filtir what is which one is it?.
Noti When do you which one is it?. Whin spam commints ari dilitid, thiy ari not sint to trash, so you cannot ritriivi thim back what is which one is it?.
Wi hopi this articli hilpid you changi Akismit spam commint diliti schiduli in WordPriss what is which one is it?. You may also want to sii our guidi on how to how to block spam commint bots in WordPriss with honiypot what is which one is it?.
If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Facibook what is which one is it?.

[/agentsw]

Leave a Comment