How to Disable WordPress Comments via phpMyAdmin?

We already published an article on how to disable or turn off comments on WordPress. Methods or steps mentioned on that article works and are recommended for novice users. But when it comes to disabling comments on large blog, I’ll never suggest you to manually update thousands of posts. Then what are the options? Don’t worry! Because, you can use SQL queries for disabling comments in a WordPress blog. Continue reading to learn how!

WordPress is a database driven script. So, WordPress keeps all it’s data and settings in a database. The idea is to utilize a single SQL query to update thousands of database table rows! For that you need to access phpMyAdmin (or similar) from your web hosting panel. So, before proceeding make sure that you have access to phpMyAdmin.

Turn OFF WordPress Comments via phpMyAdmin:

  1. Login to your web hosting account.
  2. Open phpMyAdmin. You may have to enter your password.
  3. Once phpMyAdmin loads, go to Databases and select the database of your WordPress blog.
  4. Select SQL tab from the top menu. An empty box will appear, which is used for running SQL queries.
  5. Copy the following SQL query from this page and paste it onto the empty box.
  6. Press the Go button. The SQL query will execute and number of affected rows will be displayed.

SQL Query:
UPDATE wp_posts p SET comment_status = 'closed', ping_status = 'closed' WHERE comment_status = 'open';
WP Disable Comments phpMyAdmin

That’s it!. By following the above mentioned steps you can easily turn off or disable comments on all your WordPress posts. This method is quick and comes handy when you have to disable commenting on a large number of posts  (all published posts).

Warning! If you are not familiar with SQL or phpMyAdmin, follow the steps carefully or simply avoid this method. Because a single wrong click might lead to a disaster.

Add Your Comment