Quantcast
Home » Techy Stuff

Disable Comments Globally in WordPress

Here’s a useful tip I thought I would pass along. If you have a blog or blogs you really don’t want comments on you can globally disable them in your database. Here’s how:

  1. Open the CPanel in your hosting account of contact whoever handles your hosting if you don’t have CPanel.
  2. Access PHPMyAdmin and locate the database you want to apply the changes (if no PHPMyAdmin ask your DB Admin to run the querry for you).
  3. Select the “Query” tab from the top.
  4. Enter the following code in the query box:
    UPDATE wp_posts p SET comment_status = ‘closed’, ping_status = ‘closed’ WHERE comment_status = ‘open’;
  5. If for whatever reason you renamed the wp_posts table just make sure to reference whatever you named it to avoid a query error.
  6. To reapply comments globally simply change the querry to:
    UPDATE wp_posts p SET comment_status = ‘open’, ping_status = ‘open’ WHERE comment_status = ‘closed’;

Hopefully that will help you avoid nasty spammers or keep you from having to go individually disabling comments on hundreds of posts.

[Post to Twitter] Tweet This Post 

7 Comments »

  • Rahul Singh said:

    Thanks for Tips i was looking for that thing

  • Credit business opportunity said:

    You may be able to get loans using your personal credit, so why bother building business credit? It’s best to keep personal and business matter separate. Building business credit works so why bother building business credit and it’s used differently. You can also protect yourself by building business credit.

  • Sell business credit said:

    You may be able to get loans using your personal credit, so why bother building business credit? It’s best to keep personal and business matter separate. Building business credit works so why bother building business credit and it’s used differently. You can also protect yourself by building business credit.

  • credit suite said:

    Credit Suite helps you solve the cash access problem business owners face by providing them the funding and credit they desperately need through our revolutionary Business Finance Suite.

  • ammo said:

    Way cool! Some very valid points! I appreciate you writing this
    post and the rest of the website is really good.

  • Smitha944 said:

    Howdy! I basically would like to give a huge thumbs up for the good data you’ve got here on this post. I will probably be coming once again to your weblog for far more soon. deefkdckaddfcdbf

  • Smithd925 said:

    Informative Site Hello guys here are some links that contains information which you might find useful yourselves. It is Worth Checking out. eebededadfabdedg

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.