How to disable comments in WordPress and prevent comment spam
To disable comments in WordPress, go to Settings > Discussion and uncheck the option that allows comments on new posts. This only applies to future content: existing posts and pages have to be changed in bulk, using quick edit in the posts list. If you prefer to keep comments, you can reduce spam with manual approval, a list of blocked words, an antispam plugin and disabled trackbacks.
This article is for anyone whose WordPress site receives unwanted comments or who simply doesn’t want comments. It shows how to disable them across the whole site, on older posts and in bulk, and which adjustments reduce spam when comments stay turned on.
How to disable comments across the whole site (new posts)
This is the default setting, and it applies to the content you create from now on.
- Log in to the WordPress dashboard and open Settings > Discussion.
- Uncheck Allow people to submit comments on new posts.
- Also uncheck the option to allow notifications from other blogs (pingbacks and trackbacks) on new posts.
- Click Save Changes.
This setting doesn’t affect what has already been published. Older posts and pages keep their comments open, if they were open before.
How to disable comments on posts and pages already published
Bulk editing lets you change several items at once. Before you start, make a site backup.
- Open Posts > All Posts.
- To select more than 20 items at a time, click Screen Options (at the top of the page) and increase the number of items per page.
- Check the box at the top of the list to select all the posts on the page.
- Under Bulk actions, choose Edit and click Apply.
- In the Comments field, choose Do not allow.
- Click Update.
Repeat the process under Pages > All Pages. If the list has more than one page of results, do the same on each page, or increase the number of items per page.
What happens to comments that already exist?
Disabling comments doesn’t delete the ones already posted. Depending on the theme, they keep appearing on the post, but the form for new comments disappears. If you want to remove them, go to Comments, select the items and move them to the trash.
Deleting is hard to undo once the trash has been emptied, so make a copy of the database first.
What are the options for controlling comments?
The Discussion screen gathers the settings that matter. The names may vary a little depending on the WordPress version and the language of the dashboard.
| Setting | What it’s for |
|---|---|
| Allow comments on new posts | Turns comments on or off for future content |
| Automatically close comments on old posts | Closes the comment box automatically after the number of days you set |
| Comment must be manually approved | Nothing appears on the site without your approval |
| Comment author must have a previously approved comment | Only lets through people who have had a comment approved before |
| Comment moderation | Holds comments with many links or with words from your list |
| Comment blocklist | Sends comments containing terms from your list to the trash |
| Pingbacks and trackbacks | Automatic notices from other sites that link to yours |
How to reduce spam while keeping comments on
If you want comments, combine more than one of these adjustments.
Require manual approval
Under Settings > Discussion, check Comment must be manually approved. It is the most effective measure: no spam appears publicly. The cost is reviewing the queue under Comments. A lighter alternative is to approve automatically only people who have already had a comment approved.
Hold comments by links and words
In the moderation section, set how many links a comment can contain before it is held. Spam often includes several links. In the words field, list terms, domain names or fragments that always appear in unwanted comments, one per line. Comments containing these terms are held for review.
In the comment blocklist, comments with these terms go straight to the trash. Use it carefully, so you don’t block common words and lose legitimate comments.
Install an antispam plugin
Antispam plugins analyze each comment and separate out the suspicious ones. Akismet is one of the best known and often comes with WordPress, but it has licensing rules that vary by type of site, so check them before activating it. There are free alternatives. If you need help choosing, see how to install a plugin in WordPress and prefer plugins with recent updates and good reviews.
Avoid installing several antispam plugins at the same time. Also keep WordPress and your plugins up to date, since old vulnerabilities are also used to send spam.
Disable trackbacks and pingbacks
These are automatic notices that another site has linked to yours. They are often used for spam. Under Settings > Discussion, uncheck the pingback and trackback options. For posts already published, use bulk editing and set Pings to Do not allow, if that field appears in your version.
Frequently asked questions
How do I disable comments on WordPress all at once?
Under Settings > Discussion, uncheck the permission for comments on new posts. For content already published, use bulk editing under Posts and Pages and choose Do not allow in the Comments field. Only with both steps does the whole site end up without comments.
Why didn’t the Discussion setting affect my older posts?
Because that setting only applies to new posts. Older posts keep their own comment setting. To change several at once, use bulk editing in the posts list.
Do I need a plugin to disable comments?
No. WordPress does it on its own, through the Settings and bulk editing. A plugin only helps if you have thousands of items or want to remove the comments menu from the dashboard, and in that case it’s worth testing it first after making a backup.
What is the best way to prevent comment spam?
The safest combination is manual approval, a list of words to hold or block, and an antispam plugin. No single measure guarantees zero spam, but together they greatly reduce what reaches you.
What are trackbacks and pingbacks, and can I turn them off?
They are automatic notices that another site has linked to your content. You can turn them off without harming the site, and many people do, because they are often used to send spam. The setting is on the Discussion screen.
Do disabled comments affect the site’s SEO?
Generally not. Comments aren’t needed for a site to be found. Spam published with suspicious links, however, can hurt the quality of the content, so disabling or moderating comments is usually better than leaving everything open.
If you need help setting up your site or moving WordPress to a cPanel hosting plan, contact MigraCloud.