Closing all comments in Wordpress
I have been thinking about comments a lot recently and the sheer volume of the unwanted type that’s hitting my wall.
Just in case if things turn for the worse, all I have to remember to do is, run this SQL query in phpMyAdmin (the database control panel that most of the hosts provide for managing MySQL databases):
UPDATE wp_posts SET comment_status="closed";
This would close comments on all posts in one shot. This needs to be done because post level comment setting overrides the general discussion settings, under options. Which means, if individual posts are set to allow comments (allow comment check mark per post), while the discussion setting (in Options) is set not to receive any, you’d still be able to receive comments on open posts.
The default table prefix wp_ is as defined in wp-config.php file. Replace it with your own if you have a different one. I don’t use a default prefix, by the way.
Be sure to backup before you try this.