How to disable comments in WordPress

You can add the following code to your WordPress theme’s functions.php file to disable all comments in WordPress:

function disable_comments_status() {
return false;
}
add_filter('comments_open', 'disable_comments_status', 20, 2);
add_filter('pings_open', 'disable_comments_status', 20, 2);

This code uses the comments_open and pings_open filters to return false, effectively disabling all comments on your WordPress site.

If you are unable to access your theme’s functions.php file, you can install a plugin called Code Snippets which will allow you to add this code.