If you’re getting a fair bit of spam on older blog posts, you may want to disable commenting on posts older than a year or two. Because your posts are still indexed by search engines, you’ll still be getting traffic there, but you may not want the burden of answering questions on posts that are obsolete.
You can easily do this in less than a minute with this SQL query. Sign in to phpmyadmin for your WordPress database and run this query:
UPDATE wp_posts SET comment_status = 'closed' WHERE post_date < '2009-01-01' AND post_status = 'publish';
You can change the date to whatever suits your site’s needs.
Source: Perishable Press
Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more
Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more
If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more
It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more
No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more
Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more
Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more
Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more
If you've ever wondered how you could offer a paid site management and hosting service, then this is the plugin for you. Offer a freemium or paid service, for any niche you like, it's powered Edublogs.org to success already!
Find out more
…or you could just go to the admin panel and set the option “Automatically close comments on articles older than xx days”. Found under Settings->Discussion.
Could someone please check the tab order of the comment form? Goes name -> Comment text area -> Mail -> Somewhere else -> Website
I’ve always thought closing older posts was a silly idea but I can see why some folks would want to do that. My most commented post is over a year old and still gets comments every so often.
Thanks, thats a great idea. I always wonder why is “E-mail me whenever” is default on “Anyone posts a comment”. I got around 1000 mails a day, until I learn that I can turn off mail on new comments. :) Deleting 1000 mails a day is hard work. :)
Thanks for the great tip, but would you know how to do the same thing across multiple tables at the same time? I’m running wpmu and I need to know how to do this for hundreds of blogs on one site. The tables are set up with wp_(blogid)_post. I tried doing a query exactly like yours except instead I tried
UPDATE wp_*_post SET …
This gives me a #1064 SQL Syntax error.
Do you know of a way to do this? It would be extremely helpful!