WordPress’ companion spam blocking tool, Akismet, does a fantastic job of weeding out spam from legitimate comments, but what happens? After some time, your spam comments could number in the thousands, bloating your database size, slowing down comments management, and making baby angels cry.
In my experience, on certain shared servers, simply emptying your spam folder if it has many thousands of comments can bring the server to its knees, resulting in time-outs and a spam folder that isn’t any more manageable than before your efforts to melt your server into oblivion.
While it would be great if WordPress had a clean-up feature — like it does with the trash folder — to keep the number of spam comments at bay, fortunately for us dealing with it on our own is rather easy. Simply include the following code in your theme’s functions.php
file (or custom_functions.php
if you’re using Thesis 1.8.5, as you should be), and your blog will begin automatically cleaning up spam twice a day, keeping your comments table far more manageable.
This is also a problem with our WordPress site, and it is tedious to filter all the comments.
A very helpful fix to clean the spam comments. Thanks for sharing! :)