{"id":215,"date":"2011-03-07T20:00:54","date_gmt":"2011-03-08T01:00:54","guid":{"rendered":"http:\/\/www.compdigitec.com\/labs\/?p=215"},"modified":"2011-03-07T20:00:54","modified_gmt":"2011-03-08T01:00:54","slug":"debugging-comments-on-old-posts-in-wordpress","status":"publish","type":"post","link":"http:\/\/www.compdigitec.com\/labs\/2011\/03\/07\/debugging-comments-on-old-posts-in-wordpress\/","title":{"rendered":"Debugging comments on old posts in WordPress"},"content":{"rendered":"<p>Sometimes on a WordPress blog all comment entry points on old blog posts will stop working. This can be caused by a number of problems:<\/p>\n<ol>\n<li><strong>Posts are set to expire.<\/strong> If you select the option &#8220;Automatically close comments on articles older than x days&#8221; under<strong> Settings-&gt;Discussion<\/strong>, then posts will automatically close comments after x days.<\/li>\n<li><strong>Your blog is not set to enable commenting.<\/strong> Enable &#8220;Allow people to post comments on new articles&#8221; under <strong>Settings-&gt;Discussion<\/strong>.<\/li>\n<li><strong>The specific post is not allowing comments.<\/strong> Edit the post in question and under the &#8220;Discussion&#8221; section ensure both &#8220;Allow comments&#8221; and &#8220;Allow trackbacks and pingbacks on this page&#8221; are both selected.<\/li>\n<\/ol>\n<p>If the above three steps still do not help, then you can run the following database queries to enable comments globally:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">UPDATE wp_posts SET comment_status = REPLACE (comment_status, 'closed', 'open') WHERE post_status = 'publish' AND post_type = 'post';<\/pre>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">UPDATE wp_options SET option_value = 0 WHERE option_name = 'close_comments_for_old_posts'<\/pre>","protected":false},"excerpt":{"rendered":"<p>Sometimes on a WordPress blog all comment entry points on old blog posts will stop working. This can be caused by a number of problems: Posts are set to expire. If you select the option &#8220;Automatically close comments on articles older than x days&#8221; under Settings-&gt;Discussion, then posts will automatically close comments after x days. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[750,751,864,120,152],"_links":{"self":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts\/215"}],"collection":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/comments?post=215"}],"version-history":[{"count":0,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts\/215\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/media?parent=215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/categories?post=215"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/tags?post=215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}