Do you have a lot of pending comments in WordPress that you want to delete? This can easily happen if you get a lot of spam comments.

Normally, deleting comments in WordPress is easy, but it gets trickier when there is a large number of pending comments. You may even come across weird errors while bulk deleting comments if there are too many of them.

In this article, we’ll show you how to easily bulk delete all pending comments in WordPress, step by step.

Deleting all pending comments in WordPress

What Are Pending Comments in WordPress?

Pending comments in WordPress are the comments that are awaiting moderation.

You’ll find them in the WordPress admin area by visiting the ‘Comments’ page and switching to the ‘Pending’ tab.

The number of pending comments showing in the WordPress admin sidebar and on the dashboard

We recommend users turn on comment moderation on all their websites to combat comment spam. This means all comments on your website will go to the Pending queue before they are approved.

Why would anyone want to delete pending comments?

There are many scenarios when you may need to do that. For instance:

  • Akismet anti-spam plugin got disabled on your site and suddenly all spam comments are appearing in pending.
  • You simply forgot about a website, and it gathered hundreds of comments that are no longer relevant.
  • Articles on your website generating a lot of unwanted comments
  • You forgot to turn off comments on older posts

It can take a long time to go through and moderate each comment individually. If you are confident that there are no comments marked ‘pending’ that you want to keep, then you can simply bulk delete them all.

1. Deleting All Pending Comments in WordPress Manually

If you only have a few hundred pending comments, it’s quite quick to delete them manually.

Simply go to the ‘Comments’ page in WordPress admin area and then click on the ‘Pending’ tab to see a list of all your pending comments.

By default, this list will show 20 pending comments at a time. To change this, click on the ‘Screen Options’ tab at the top-right corner of the page.

Opening up the screen options tab on the pending comments page

Next, type ‘100’ into the ‘Number of items per page’ and click the Apply button:

Changing the pagination for the comments to fit more on each page

Now that you have 100 comments displaying, simply check the box to the left of ‘Author’ at the top of the list of comments. This selects all the comments on the page:

Check the box to the left of Author to select all comments on the page

Then, click on the ‘Bulk actions’ dropdown and select the ‘Move to Trash’ option. Go ahead and click the Apply button to move all those comments into the trash:

Bulk selecting the pending comments and moving them to the trash

WordPress will automatically show the next 100 comments on the page. Simply repeat the process to remove these too.

When you delete any comment on WordPress, it is not deleted right away. Instead, it is sent to the ‘Trash’ and will remain there for 30-days. After that, it will be automatically deleted permanently.

If you would rather delete them permanently right away, then you need to switch to the ‘Trash’ tab on the ‘Comments’ page and then click on the ‘Empty Trash’ button.

Emptying the trash to delete all the pending comments from WordPress

You will then see a message confirming that those comments have been deleted:

WordPress showing a message to confirm that the comments have been permanently deleted

Note: You can use the Screen Options to show up to 999 comments per page. However, this will increase the load on your WordPress hosting servers and slow down your site. You might also see an error message like this one when you try to move comments to the trash:

Error message shown when trying to move too many comments to the trash at one time

If you have more than a few hundred pending comments, then we recommend using a plugin method to delete them.

2. Deleting Large Number of Pending Comments in WordPress Using a Plugin

The quickest way to delete a very large number of pending comments is to use a plugin.

This will delete your pending (and spam) comments permanently. We recommend making a backup of your WordPress site before proceeding, just in case you change your mind later.

First, you need to install and activate the Delete Pending Comments plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, go to the Comments » Delete Pending Comments page in your WordPress admin. You will see a message letting you know how many pending comments there are.

Note: This figure includes spam comments, which are deleted at the same time as the pending comments.

The Delete Pending Comments page in the WordPress admin

To delete all the pending comments, you need to type the required line of text into the box. You can copy and paste this text if you prefer.

After that, go ahead and click the ‘Delete Pending Comments’ button.

Enter the line of text in order to delete the pending comments

You will then see a message confirming that all pending and spam comments have been deleted.

Message confirming that all pending and spam comments have been deleted

Deleting Spam Comments Only in WordPress

What if you don’t want to delete pending comments but just want to delete the ones that are marked as spam? That’s very easy to do in WordPress.

First, go to Comments in your WordPress admin and click on the Spam tab:

Click on the Spam tab to see a list of comments that have been marked as spam

Next, click the Empty Spam button. This will delete all spam comments permanently, not just the ones on the current page:

Empty the spam to permanently delete all spam comments

We hope this article helped you learn how to delete all pending comments in WordPress. You may also want to see our WordPress security guide to protect your website, or see our guide on how to allow users to report inappropriate comments in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Delete All Pending Comments in WordPress appeared first on WPBeginner.



Source: WPBeginner

Leave a Reply