{"id":470,"date":"2015-07-27T21:43:45","date_gmt":"2015-07-27T15:43:45","guid":{"rendered":"http:\/\/hasibul.info\/blog\/?p=470"},"modified":"2015-07-27T21:43:45","modified_gmt":"2015-07-27T15:43:45","slug":"disable-enable-wordpress-comments-from-phpmyadmin","status":"publish","type":"post","link":"https:\/\/hasibul.info\/blog\/2015\/07\/27\/disable-enable-wordpress-comments-from-phpmyadmin\/","title":{"rendered":"Disable \/ enable WordPress comments from phpMyAdmin"},"content":{"rendered":"<p>WordPress comments option is often not needed for our website. It is also true that we often forget to disable the commenting option. As a result &#8211; spammers fillup your website with garbage\/spam comments to create backlinks of their website. You can always disable the commenting option from the wordpress admin dashboard. But assume you are a web hosting provider and you found one of your client&#8217;s WordPress site is quickly filling up with spam comments. You may not have wordpress admin password of your client&#8217;s website. In this case you can quickly disable comment option by using a small query in phpMyAdmin panel.<\/p>\n<p>You need to follow the following steps:<\/p>\n<p>1. Go to the phpMyAdmin panel from your hosting control panel.<\/p>\n<p>2. Locate the wordpress database in the drop down list in the left panel and click on it.<\/p>\n<p>3. Now click on the &#8220;SQL&#8221; tab in the navigation panel in the right page.<\/p>\n<p>4. Within the &#8220;Run SQL Query&#8221; box, paste the following code:<\/p>\n<blockquote><p>UPDATE wp_posts p SET comment_status = &#8216;closed&#8217;, ping_status = &#8216;closed&#8217; WHERE comment_status = &#8216;open&#8217;;<\/p><\/blockquote>\n<p>(Replace &#8220;wp_post&#8221; with the appropriate prefix of the wordpress table)<br \/>\nIf successful, you should have disabled the ability to comment on your posts across your entire blog. To re-enable the commenting run the following SQL query the same way you ran the comment disable query:<\/p>\n<blockquote><p>UPDATE wp_posts p SET comment_status = &#8216;open&#8217;, ping_status = &#8216;open&#8217; WHERE comment_status = &#8216;closed&#8217;;<\/p><\/blockquote>\n<p>(Replace &#8220;wp_post&#8221; with the appropriate prefix of the wordpress table)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wordpress comments option is often not needed for our website. It is also true that we often forget to disable the commenting option. As a result - spammers fillup your website with garbage\/spam comments to create backlinks of their website. You can always disable the commenting option from the wordpress admin dashboard. But assume you&hellip;<\/p>","protected":false},"author":1,"featured_media":468,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,13,18,6,12,203],"tags":[206,211,208,207,209,210,160],"how-to":[],"_links":{"self":[{"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/posts\/470"}],"collection":[{"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/comments?post=470"}],"version-history":[{"count":0,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/posts\/470\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/media\/468"}],"wp:attachment":[{"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/media?parent=470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/categories?post=470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/tags?post=470"},{"taxonomy":"how-to","embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/how-to?post=470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}