How to Disable Comments in WordPress via coding

After you disable comments, your pages might display a “comments are closed” message at the bottom. To get rid of this message:

  1. Connect to your WordPress site using an FTP client.
  2. Open the current theme folder, which is in the directory “/wp-content/themes/”.
  3. Find the file “comments.php” and rename it to “comments1.php”.
  4. Create a new file and name it “comments.php”. Doing this should remove the message.

If your theme doesn’t have a “comments.php” file, contact the theme’s developer and ask them how to best solve this problem.

Comments work for some websites and not others. It’s up to your own preference and whether you see comments as beneficial. You can still provide quality content without comments to reaffirm — let visitors decide for themselves whether your site is worth returning to.