WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] MySQL Query Needed to Delete Older Comments (1 post)

  1. Yet Another WP User
    Member
    Posted 1 year ago #

    Hello everyone

    I run a self-hosted WordPress blog which has approx. 2000 topics. Many of them contain more than 200 comments.

    I want to have a MySQL query which first search for posts which have more than a fixed number of comments such as 50 comments and then delete the extra old comments.

    For example, the query searches for posts having more than 50 comments and then it deletes all old comments from those posts to make their comment count under 50.

    I'll really appreciate if someone can provide such query statement.

    Thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by Yet Another WP User
  • This topic is resolved
  • WordPress version: 3.5.1