WordPress.org

Support

Support » Plugins and Hacks » Auto-delete old comments?

Auto-delete old comments?

  • Hello, I’m wondering how I can autodelete old comments. Say every 90 days or so.

    I’ve tried finding plugins for it but haven’t had any luck.

    Could anybody point me in the right direction?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Why do you wish to do this?

    The website I’m creating is using a guestbook function as a buy/sell board. They don’t want it to clutter up and would like an automated system that removed the comments (ie ads) to be removed after 90 days.

    I could realy use some help on this one. Anybody have any tips?

    I’m not aware of any plugins to automate the task. Do you have access to your database via some other means than WP? If so, this will work:

    delete from wp_comments where date_sub(now(), interval 90 day) > comment_date;

    Assuming your comments table is called wp_comments of course. I know this is not automated but just run it on a weekly basis or something.

    Well if I can make an easy button in the admin for it, I can skip the automated part.

    I do have database access.

    Not sure how to use the snippet you wrote there though.

    need to do a manual delete. not yet seen any automatic plugin!

    I’ve the Auto Delete Posts plugin that could easily be modified to delete comments.

    Regards

    Very cool. =) Would you happen to have the time to help me with the modification? I’m not much of a coder. -_-

    Yeah I should have some time, send me a quick ping through the contact form on my website so we can communicate off-forum.

    Regards

    Sent you a contact-me email, Cypher. Hope you got it.

    Maybe this is a little off-topic, but if the plugin can be modified to, say, configurable to delete configurable posts’ comments according to configurable criteria (older than x days, more than n comments etc), then it would be quite a powerful comments management function.

    In particular, what I’m thinking of is a guestbook. People often set up a post to act as a WordPress guestbook, but the comments just go on accumulating. If we have such a plugin, we could set it to delete the guestbook post’s oldest comments whenever there’s more than 100 comments.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Auto-delete old comments?’ is closed to new replies.
Skip to toolbar