How to Disable Comments on WordPress Pages and Posts

Introduction
By default, WordPress allows visitors to leave comments on posts — and sometimes even on pages. While this is great for engagement, not every site needs or wants comments. If you’re managing a business site, portfolio, or landing pages, it’s often best to disable comments entirely or selectively.
This guide walks you through several ways to disable comments on your WordPress website — no plugins required.
Option 1: Disable Comments on Individual Posts or Pages
To turn off comments on a single post or page:
- Log in to your WordPress dashboard
- Go to Posts or Pages and click “Edit” on the one you want to modify
- In the right-hand sidebar, open the “Discussion” panel
- Uncheck “Allow comments”
- Update the page/post
Note: If you don’t see the Discussion panel, click the three-dot menu at the top right and select Preferences > Panels > Discussion.
Option 2: Disable Comments on All Future Posts
To stop comments on all future posts:
- Go to Settings > Discussion
- Uncheck the box that says “Allow people to submit comments on new posts”
- Click Save Changes
This will prevent comments on new posts and pages going forward, but won’t affect existing ones.
Option 3: Disable Comments Site-Wide (for Existing Content)
If you want to bulk disable comments on existing posts and pages:
- Go to Posts > All Posts (or Pages > All Pages)
- Select all items using the checkbox at the top
- From the “Bulk actions” dropdown, choose Edit and click Apply
- In the bulk editor, set Comments to Do not allow
- Click Update
Option 4: Turn Off Comments Using Code (Advanced)
If you want to completely remove the comment functionality from your theme, you can edit your theme’s files.
Add the following to your theme’s functions.php
file:
function disable_comments_everywhere() {
// Disable comments
add_filter('comments_open', '__return_false', 20, 2);
add_filter('pings_open', '__return_false', 20, 2);
// Hide existing comments
add_filter('comments_array', '__return_empty_array', 10, 2);
}
add_action('init', 'disable_comments_everywhere');
This disables both comments and pings across the entire site.
Bonus Tip: Use a Plugin (If Preferred)
If you’d rather not touch code, you can use a plugin like:
- Disable Comments – Allows global or specific control over comment visibility
Conclusion
Whether you’re dealing with spam or just want to keep things clean and distraction-free, WordPress makes it easy to disable comments selectively or completely. Choose the method that fits your needs, and enjoy a quieter, more focused site!