Enable or Disable All Comments on WordPress at once

[box] CMS: WordPress  Difficulty Level: medium  Time: 3 min [/box]

Here is a small snippet of MYSQL queries that would enable or disable comments on all of your wordpress posts at once. Instead of enabling or disabling comments one by one on each, which could be little time consuming if you have got too many posts.

// Disable all comments
UPDATE wp_posts SET comment_status = 'closed', ping_status = 'closed';

// Enable all comments
UPDATE wp_posts SET comment_status = 'open', ping_status = 'open';

This first query will disable comments, and second one will enable. Simple as that. For novice users, you would have to log into your database using phpmyadmin, a common utility provided by all web hosts, to manage your database. Once you are logged into your database, paste above query, in the SQL Query box and run it.

Hello my name is Imran Jafri, I am the Editor and founder of Maboot Mag. I am extremely passionate about Web design, UX and GUI. I love to play with PHP, javascript and Wordpress. Of course I am a MAC and using Ubuntu as my secondary OS. That's all.

Share This Post

Related Articles

Leave a Reply

© 2019 Maboot.com. All rights reserved. Site Admin · Entries RSS · Comments RSS
Powered by WordPress · Designed by Theme Junkie