[resolved] DB query for all comments on/off? (3 posts)

  1. Businessman
    Posted 10 years ago #

    I've imported a MT blog to WP - because of extensive spamming of MT software, I had to close the comments and trackbacks, but I'd like to enable them for the WP install.

    What DB query do I need to use to reset all entries as comments and trackbacks on, instead of all off?

    Many thanks for replies.

  2. bob58
    Posted 10 years ago #

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

    If you are using a different prefix, you have to put it in instead of 'wp_'.

    Sorry, to switch them all off, set the _status to 'closed';

  3. Businessman
    Posted 10 years ago #

    Many thanks for that - much appreciated. :)

Topic Closed

This topic has been closed to new replies.

About this Topic