Disable comments and pingbacks on old posts in WordPress
It’s pretty straight forward to turn off pingbacks and comments in WordPress. It’s just a checkbox under “settings” and “discussion”… but what’s not obvious from that setting is that it only applies to new posts created after you made the change.
If you’ve got a fair few existing posts, it’d be time consuming to edit each post and alter the settings individually for each one. You also might find someone telling you to go into the database and alter something there.
Nope. Updating the settings of all the old posts is much easier than that, it’s just a little hidden.
Here’s what you do:
- Go to your posts page
- Expand the screen options section
- Change the options so you’ve got a decent number of posts on screen
- Apply the screen options change
- Select all posts
- Choose “edit” in the bulk options drop down.
- Set “comments” to “do not allow” (to disable commenting)
- Set “pings” to “do not allow” (to disable pingbacks)
- Click on the “update” button.
If you didn’t set your screen options high enough to show all posts, then you’ll need to repeat the above for “page 2” of all posts (and 3… 4.. etc)
Turning off pings helps reduce the amount of spam coming into your WordPress installation, even if you are using Disqus or akismet.