• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » SQL commands to handle WordPress Comment Moderation in one click

By Abhishek Ghosh August 8, 2011 10:01 am Updated on August 8, 2011

SQL commands to handle WordPress Comment Moderation in one click

Advertisement

SQL commands can be used for WordPress from phpMyAdmin to delete, approve the comments and pingbacks in one click.

Previously, we wrote Indispensable MySQL queries for custom fields in WordPress, this time few examples of SQL commands.

 

What is our goal to use these SQL commands?

 

We can these SQL commands from phpMyAdmin for WordPress to delete all the spam comments, open and close all comments, Enable / disable comments, pingbacks and trackbacks etc just using these SQL commands.

Advertisement

---

 

Expected User Level for using these SQL commands: Advanced.

 

Understanding how these SQL commands will work

You have to access phpMyAdmin as Admin with all privileges. Those who are beginners and wants to experiment, it is advisable to test it first on an offline installation.

 

SQL commands

 

Vim
1
DELETE FROM wp_comments WHERE wp_comments.comment_approved = 'spam' ; DELETE FROM wp_comments WHERE wp_comments.comment_approved = 'spam';

 

Deleting this will delete all spam comments at once:

 

To close comments on ALL published post:

 

Vim
1
UPDATE wp_posts SET comment_status = 'closed' ; UPDATE wp_posts SET comment_status = 'closed';

 

Enable / disable comments, pingbacks and trackbacks:

 

Vim
1
UPDATE wp_posts SET comment_status = 'open' , ping_status = 'open' WHERE comment_status = 'closed' AND post_status = 'publish' ; UPDATE wp_posts SET comment_status = 'open', ping_status = 'open' WHERE comment_status = 'closed' AND post_status = 'publish';

SQL commands to handle WordPress Comment Moderation in one click

Conclusion on SQL commands

 

The above SQL commands are only few examples. You will find more similar SQL commands in SQL specific sites.

If you want learn more, you can buy some nice books on SQL commands. Running WordPress is not difficult, but playing with advanced settings increases knowledge of those who are interested.
Signature

This Article Has Been Shared 728 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to SQL commands to handle WordPress Comment Moderation in one click

  • Create a favicon for your WordPress blog

    Branding is a very important factor on the web to differentiate yourself from others, in this article, learn how you can create and add a favicon for your own blog.

  • 14 essential tips for securing your WordPress site

    The security of a WordPress site is not to be taken lightly. Hacking of Wordpress site can happen to anyone and with these 14 tips will help limit potential damage.

  • Customize blockquote using CSS and graphics in WordPress

    Blockquote should reflect the personality of the blog site writer. It looks nice when it is customized to reflect the brand of your blog or simply to add an effect of quotation mark.

  • Definitions of abbreviations used for advertisements

    You have probably saw abbreviations like CPC, CTR or CPM for advertisements. Here a quick summary of the main abbreviations used.

  • RESTful API for WordPress to Enable Public HTTP GET Request for Posts

    RESTful API for WordPress Can Enable Many Features to a Website Like We Can Fetch Data for Facebook Page from Widget via HTTP GET Request.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (22.1K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Why Data Management is so Important in a Business July 6, 2022
  • Application Modernization : Cloud Can Take Your Applications to the Next Level July 5, 2022
  • Ways To Make Sure Your Online Course Outshine Others July 3, 2022
  • Will Smart Factories Become the New Assembly Line? July 2, 2022
  • The Cost of Doing Business as a Handyman July 1, 2022

About This Article

Cite this article as: Abhishek Ghosh, "SQL commands to handle WordPress Comment Moderation in one click," in The Customize Windows, August 8, 2011, July 7, 2022, https://thecustomizewindows.com/2011/08/sql-commands-to-handle-wordpress-comment-moderation-in-one-click/.

Source:The Customize Windows, JiMA.in

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Privacy Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2022 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy