Skip to content

Instantly share code, notes, and snippets.

@krogsgard
Created November 6, 2012 20:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krogsgard/0fbdbdfd03aa09a80cf1 to your computer and use it in GitHub Desktop.
Save krogsgard/0fbdbdfd03aa09a80cf1 to your computer and use it in GitHub Desktop.
update comment status with MySQL
/* select posts with closed comment_status for checking how many you have */
select * from wp_posts where comment_status = 'closed' and post_status = 'publish' and post_type = 'post'
/* update posts to open the comment status */
update wp_posts set comment_status = 'open' where post_status = 'publish' and post_type = 'post' and comment_status = 'closed'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment