Month: March 2011
WordPress – Squash Spam Comments
A quick and easy way to squash the damn WordPress Spam bots.
First step is to turn off comments on all of your posts using the following SQL query:
UPDATE wp_posts p SET comment_status = ‘closed’, ping_status = ‘closed’ WHERE comment_status = ‘open’;
* Note you may have to adjust the wp_posts table name to suit your install.
The default comment and ping status is open on all new posts – change the default to ‘closed’ with the following 2 queries:
alter table wp_posts change comment_status comment_status varchar(20) default ‘closed’;
alter table wp_posts change ping_status ping_status varchar(20) default ‘closed’;
Again, you may need to adjust the wp_posts table name to your install.