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:
- Login to your web hosting account.
- Open phpMyAdmin. You may have to enter your password.
- Once phpMyAdmin loads, go to Databases and select the database of your WordPress blog.
- Select SQL tab from the top menu. An empty box will appear, which is used for running SQL queries.
- Copy the following SQL query from this page and paste it onto the empty box.
- Press the Go button. The SQL query will execute and number of affected rows will be displayed.
UPDATE wp_posts p SET comment_status = 'closed', ping_status = 'closed' WHERE comment_status = 'open';
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.