How to Quickly Delete All Pending Comments in WordPress

delete pending commentsWordPress spam cleanupbulk delete commentsDelete Pending Comments pluginWordPress SQL delete
Published·Modified·

When a blog is newly set up, it is often plagued by spam comments. If left unmanaged for a long time, the number of spam comments can reach thousands or even tens of thousands. Manually deleting them one by one is extremely inefficient. Here, we introduce a plugin that allows you to delete all pending comments at once: Delete Pending Comments.

This plugin provides a fast way to delete all pending comments, which is useful for victims of spam attacks. I have localized this plugin into Chinese, as shown in the screenshots below:

Delete Pending Comments Plugin Interface Before Localization

Before Localization

Delete Pending Comments Plugin Interface After Localization

After Localization

Once the plugin is localized, it is very easy to use. Simply follow the prompt and enter the phrase: "I am sure I want to delete all pending comments and realize this can't be undone", then click the delete button.

Of course, if you prefer not to use a plugin, you can solve this problem using SQL statements. Log in to the database management backend via phpMyAdmin and execute the following statement on the corresponding database:

delete from wp_comments where comment_approved = 'parameter'

Parameter Explanation:

  • spam: Spam comments
  • 0: Pending comments
  • 1: Approved comments

For example, to delete all spam comments, execute:

delete from wp_comments where comment_approved = 'spam'

However, simply deleting spam or pending comments is not enough. You also need to prevent future spam comments. Plugins like the built-in Akismet for WordPress are very powerful, or you can use social commenting tools to achieve this goal.

Download Link: Delete Pending Comments (Chinese Version)