How to Enable or Disable Comments in WordPress

When you create a new post and page in WordPress, comment is enabled by default. This doesn’t always work in everyone’s favor. There are many times you don’t allow comments on posts or pages such as Policy, About. And there are times you forget to enable comments on posts. There are many ways to enable or disable comments .

Enable/Disable on individual post/page

WordPress has an option for author to enable or disable comment status under post’s body. However, it is not shown by default. First, you need top enable Discussion box by check on Discussion under Screen Options popup menu.

After that, you will see the discussion box displayed right below post’s body. You decide whether to allow comment on current post or not.

Enable/Disable comment programmatically

Making change in individual post is nice, but how will you do it when there are hundreds of posts or pages waiting to be modified? If you knows a little bit about MySQL, this will come in handy.

//enable comments
UPDATE wp_posts SET comment_status = 'open'
//disable comments
UPDATE wp_posts SET comment_status = 'closed'

In most cases, wp_posts is the table which stores posts’ data and their comment status. If you chose a different table prefix when installing WordPress, you need to adjust the table name to be yours.

Enable/Disable comment by using plugins

If you are not tech savvy, using plugins is your solution. Following are the best plugins for this case.

No Page Comment

No Page Comment is a plugin that allow bulk-ebale or bulk-disable comment on pages. It divided posts and pages into 2 cases, current ones and new ones. If you only want to modify old posts, choose setting on “Modify all current”; otherwise, choose “Disable comments on new”.

Disable Comments

Disable Comments allows administrators to globally disable comments on any post type. Use this only if you don’t want to allow comment on your blog.