A year ago today, I wrote about fighting trackback spam on a self-hosted WordPress site. It involved running a SQL query directly on the database to speed up the clean up process and make it more efficient. Since I was dealing with over 100 spam-linking comments on each post, I could use all the help in that regard I could get. Fortunately, the solution written up there worked out quite well.
Unfortunately, I glossed over a side-effect of the manual clean-up effort. Since I deleted the trackback comments directly from the database, the process did not kick off WordPress’s other functions like updating the comment count on an article. This slight annoyance meant the comment count in an article byline would be extremely inflated over the actual number of comments. I dealt with it for 365 days, through no planning of mine, today I cleaned up the mess with one easy to use query to synchronize the comment count with the actual number of comments received per article. While my problem stemmed from previous modifications taken in the database there are plenty of plugins or other ways for this value to become inaccurate.
… Continue Reading