How to Completely Disable Comments in WordPress
In this article I showcase a few simple code snippets to completely disable the WordPress commenting system.
Disable WordPress Commenting
Without getting too far into the weeds, you may easily disable most WordPress commenting features under the WP-Admin > Settings > Discussion section by unchecking:
- Attempt to notify any blogs linked to from the post
- Allow link notifications from other blogs (pingbacks and trackbacks) on new posts
- Allow people to submit comments on new posts
I then recommend checking:
- Users must be registered and logged in to comment
- Comment must be manually approved
After saving your changes to the Discussion section, visitors to your WordPress website will not have the ability to post comments any “new” blog posts or pages. Old blog posts or pages may still have “Allow Comments” checked off as an option but any such comments would be held for your review.
Completely Disable WordPress Commenting System
Below are some handy code snippets and functions to help you get even greater control over the WordPress commenting system.
NOTE: To utilize these code snippets you will need to open your child theme’s functions.php file and insert the code snippets desired (excluding the php open and close php tags <?php at top and ?> at bottom):
I welcome your thoughts, questions or suggestions on my article on how to completely disable commenting in WordPress.
You may support my work by sending me a tip using your Brave browser or by sending me a one time donation using your credit card.
Let me know if you found any errors within my article or if I may further assist you by answering any additional questions you may have.