Disable comments on old posts and pages in WordPress
You can prevent visitors from leaving comments on old WordPress posts and pages to reduce comment spam.
- Sign in to WordPress.
- On the left-side menu, select Settings > Discussion.
- In the Other comment settings section, select the checkbox next to Automatically close comments on articles older than XX days.
- On the same line, change the number of days to the number you prefer.
- Scroll to the bottom of the page and select Save Changes.
Now that you've changed this setting, users can't leave comments on posts and pages older than the specified number of days.