banner



How To Delete All Blog Posts Wordpress

Nov 09, 2021

Merkys M.

3min Read

How to Delete All Comments on WordPress

How to Delete All Comments on WordPress

Do you want to delete all comments from your WordPress site, but don't have the time to do it one at a time? Not to worry, this article will explain how to delete all comments on WordPress in bulk using three different methods.

Feel free to check them out to see which one is most suitable for your needs.

Reasons to Delete Comments

Comments are a great way to build a strong relationship with your audience. However, there are times when you need to remove all comments from your WordPress site.

For example, you want to get rid of spam due to the lack of anti-spam setup. Or maybe you create dummy comments for testing purposes that serve no purpose once the trial is done.

These types of comments will harm your user experience and your site's SEO. In those cases, you need to delete all WordPress comments as soon as possible, to prevent any issues.

How to Delete All Comments On WordPress?

There are three alternative ways to delete all comments on WordPress. Check out the tutorials below to help you decide which one best suits your preferences.

Use the WordPress Admin Dashboard

WordPress has a way to delete all comments quickly. You can access this feature from your admin dashboard — the Comment menu, to be exact.

  1. Login to your WordPress admin dashboard, and then navigate to the Comments section.
    How to delete all WordPress comments from WordPress dashboard
  2. On the Bulk Actions dropdown menu, choose the Move to Trash option. Select all comments, then click Apply.
    This image shows you how to delete all comments in WordPress from the platform's Comments section.

Use a WordPress Plugin

WP Bulk Delete is one of the best plugins that will help you to delete all WordPress comments. It enables you to remove various types of data in bulk, including but not limited to comments. The best part is that you can implement filters and conditions based on your needs.

If you only need the basic features of a comment remover tool, the free version will do just fine. Should you need more filter options, you can upgrade to the Pro version for $29.00 per site.

First, you need to install the WP Bulk Delete plugin. Once you've installed WP Bulk Delete, follow these steps to delete all WordPress comments:

  1. From your WordPress admin dashboard, navigate to the WP Bulk Delete -> Delete Comments section.
    access to WP Bulk Delete menu
  2. Check the filters that you want to use. If you use the free version, you can filter the comments based on their status and publication date. Then, click Delete Comments.
    This image shows WP Bulk Delete's comment deletion settings.

Use phpMyAdmin

You can delete all WordPress comments directly from your database through phpMyAdmin. Despite so, this method requires knowledge about database and SQL. If you're not familiar with it, you might want to reconsider using the previous methods instead.

phpMyAdmin offers two options to delete comments from your site — running an SQL query or emptying the comment table. Either way, you're going to modify two tables where comments usually take place: wp_comments and wp_commentmeta.

Note: the tables' names might differ depending on your database prefix.

Your database is accessible from your web hosting control panel. In this tutorial, we will show you how to access it from Hostinger's hPanel.

Follow these steps to delete all WordPress comments using an SQL query:

  1. From your Hostinger hPanel, navigate to the phpMyAdmin.
    phpmyadmin on hPanel
  2. Identify which database you want to modify, then click Enter phpMyAdmin.
  3. In phpMyAdmin, click on the wp_comments table.
    This image shows you how to access wp_comments from phpMyAdmin.
  4. Click on the SQL tab at the top to open the SQL query window.
    This image shows you how to access the SQL query tab of the selected table.
  5. Choose one of the following queries to delete comments based on particular conditions:
    Delete all WordPress non-approved and pending comments:
    DELETE from wp_comments WHERE comment_approved =  '0'            

    Delete all WordPress approved comments:

    DELETE from wp_comments WHERE comment_approved =  '1'            

    Delete all WordPress trash comments:

    DELETE from wp_comments WHERE comment_approved =  'trash'            

    Delete all WordPress spam comments:

    DELETE from wp_comments WHERE comment_approved =  'spam'
  6. Add the chosen query to the SQL query window, then click Go. Repeat this step several times according to the number of queries you want to execute.
    This image shows you how to execute the SQL query.
  7. Repeat the entire steps to remove comments from the wp_commentmeta table.

If you want to delete all WordPress comments unconditionally, you can follow these steps:

  1. In phpMyAdmin, tick wp_comments and wp_commentmeta's respective boxes to the left.
  2. Scroll down until you locate With selected dropdown menu. Click on it, then choose the Empty option.
    This image shows you how to automatically generate SQL query to empty wp_comments and wp_commentmeta tables.
  3. Click Yes to confirm that you want to execute the presented queries.

Here you have it! This way, you can quickly delete all WordPress comments.

Conclusion

While comments play an essential role in growing your site, there are times when you need to purge them from the site. The types of comments you'd want to remove are the ones that can harm the site's SEO and user experience.

Here are three alternative ways to delete comments in bulk on WordPress:

  • Using the WordPress admin dashboard — the easiest way to do the job, but has limited options for filtering the comments.
  • Using WP Bulk Delete plugin — offers more flexibility in filtering the comments, but advanced filtering requires the Pro version of the plugin.
  • Using SQL queries in phpMyAdmin — provides total control over the deletion process, but requires technical knowledge.

As each method has its pros and cons, it's best to consider your needs first before making the decision. You can also do a test run on a couple of WordPress comments first to see which method best suits your preferences.

Author

Merkys is a server administrator and Linux expert at Hostinger. He keeps everything up & running while tackling advanced server management issues. Besides that, he's a big fan of blockchain technology, web development, and bodybuilding.

How To Delete All Blog Posts Wordpress

Source: https://www.hostinger.com/tutorials/how-to-delete-all-comments-wordpress

Posted by: santosandesell.blogspot.com

0 Response to "How To Delete All Blog Posts Wordpress"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel