Inspiration For Creative Minds
Home » Labs » WordPress Disable all comments through MySQL  

Filed under Labs

Here is a simple MySQL query which help you to disable all comments on WordPress blog. Just run this query on your server, before running this query we recommend to keep an updated copy of database safely.

<?php
//Query for Disable WP comments
UPDATE wp_posts SET comment_status = 'closed', ping_status = 'closed';
 
// Query for Enable WP comments
UPDATE wp_posts SET comment_status = 'open', ping_status = 'open'; 
?>
It's only fair to share...Share on Google+Tweet about this on TwitterShare on Facebook
Labs

Posts you may like: