Of late I’ve been noticing a surge in spam comments.

Akismet does a great job at filtering those comments and sending it directly to spam.

But there’s a big problem with this onslaught of bots on your site. You’ll be paying a large hosting bill or your host would ask you to upgrade.

Now Cloudfare can help.

But in case you don’t want Cloudfare there’s an alternative method. It’s less effective but works nonetheless.

The technique would face some problems in execution if you’re in the habit of updating your old posts regularly.

In that case I recommend turning of comments for posts older than a month. Problogger routinely turns of comments for old blogposts and bot-attack might be the most compelling reason.

It also reduces your work-load.

Another advantage is if your site is loading way too low because of the incessant traffic from spam bots disallowing comments might come in handy.

So here’s how to go about it:

Go to WordPress Dashboard and click on All posts. In the default view you can see 20 posts. I can make thing a tad bit easy for you.

Go to screen options and you will find an open to enter a number on how many posts you want displayed. See the image below.

screen options wordpress Why and how to close comments on older posts [WordPress]?

I changed it to 100. You can very well key in 300 or 1000. Your decision. Apply the changes.

Now select the posts you want to disable comments for.

I don’t recommending doing it one by one. Just bulk select and unselect the new posts. Easy peasy.

In the bulk options you will find an option to edit.

Select comments to do not allow and you have thus disabled commenting.

Click on “update” button and you’re good to go.

In addition to this I also disabled pings and trackbacks for all posts. They are a massive headache and you don’t need them.

You can also opt to disable comments for posts older than 7 days, 30 days, or 60 days.