WordPress.org

Ready to get started?Download WordPress

Forums

close comments on all posts of a blog (3 posts)

  1. OperaManiac
    Member
    Posted 7 years ago #

    what would be the sql command to run to
    close comments on all posts of a blog?

  2. Kafkaesqui

    Posted 7 years ago #

    UPDATE wp_posts SET comment_status = 'closed' WHERE comment_status = 'open';

    Likely you'll want to hit (ping|track)back status on your posts as well:

    UPDATE wp_posts SET comment_status = 'closed', ping_status = 'closed' WHERE comment_status = 'open';

    As usual, table prefix assumed to be 'wp_', so change the name of the posts table (wp_posts) for your use, if necessary.

  3. OperaManiac
    Member
    Posted 7 years ago #

    thx

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.