Delete Pending Comments in WordPress

Delete Pending Comments
This article will help you to know how to remove pending comments in WordPress.

Nowadays, WordPress comment spamming is becoming a common issue. Some spam prevention methods and plugins will help you eliminate these issues ( I’m not going to discuss those plugins now. Maybe next time ). But the thing is, most of us install these plugins after the attack. It will stop the spam issue, but you must be having thousands of spam comments in the queue ( pending status ). Removing these spam comments manually is not an easy task and may take weeks or months.

So are there any other options to delete all pending comments from WordPress? Yes, there is, and there are several methods to do it. I’ll show you a MySQL one-liner to do this. Please follow the steps given below.

1) Login to your server via SSH.

2) Execute the command given below. ( You don’t have to login to MySQL command prompt )

mysql -uDB_USERNAME_HERE -pDB_USER_PASSWORD_HERE -DYOUR_WORDPRESS_DB_NAME_HERE -e "DELETE FROM wp_comments WHERE comment_approved = '0';"

( Please note that if your WordPress database prefix is something else, please replace “wp_” with that prefix. )

What if you don’t have command line access ( Maybe a Shared server environment ) or don’t want to deal with the SSH or command line? Don’t worry; there are several WordPress plugins that do this same thing without messing with your database directly. You can download one plugin from – Delete Pending Comments

This will do the trick and will delete all pending WordPress comments.

Share this post

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

WordPress Management Plan

Focus on your business, and let us take care of your WordPress Websites!
From what you are reading, it seems you are interested in WordPress and related technologies. If you have a moment to spare, please take a look at our WordPress Management Plan, which might interest you even more!
WordPress Management Plan

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

ServerHealers uses cookies.