How to delete all comments wordpress

New Page

WordPress Basic Concepts

June 02, 2022

Merkys M.

4 minute read

How to delete all comments in WordPress manually, use a plugin and more

Copy link

Copied !

How to delete all comments in WordPress manually, use a plugin and more How to Manually Delete All Comments in WordPress, Using a Plugin, etc.

¿Desea eliminate all comments from your WordPress site, pero no tiene tiempo para hacerlo de uno en uno? No worries, this is an explained article that eliminates all WordPress comments of the most used form with 3 different methods.

Do not hesitate to consult them to see which one is the most suitable for your needs.

Start a free 7-jours email course on WordPress

  • Reasons for deleting comments
  • How to remove all comments in WordPress?
    • Use the WordPress admin panel
    • Use a WordPress add-in
    • Use phpMyAdmin

Reasons for deleting 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 a lack of anti-spam settings. Or maybe you create dummy comments for testing purposes that are useless once the test is over.

This type of comments harm your user experience and the SEO of WordPress. In esos casos, debe eliminar all los comentarios de WordPress lo antes possible para evitar problemas.

How to remove all comments in WordPress?

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

Utilice el panel de administración de WordPress

WordPress tiene una forma de eliminar todos los comentarios rápidamente. Puede acceder a esta función desde su panel de administración: el menú Comentarios , para ser exactos.

  1. Inicie sesión en su panel de control de WordPress y vaya a la sección Comentarios . How to remove all WordPress comments from the WordPress dashboard 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. Esta imagen muestra cómo eliminar todos los comentarios en WordPress de la section Comentarios de la plate-forme. Cette image vous montre comment supprimer tous les commentaires dans WordPress à partir de la section Commentaires de la plateforme.

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/site.

First, you need to install the WordPress 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. accès au menu d'élimination de la masse de WP accès au menu WP Bulk Delete
  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. Esta imagen muestra la configuration de l'élimination des commentaires de WP Bulk Delete. Cette image montre les paramètres de suppression des commentaires de WP Bulk Delete.

Use phpMyAdmin

You can delete all WordPress comments directly from your database through phpMyAdmin. Despite that, this method requires knowledge about databases 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.

Important! 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 et hPanel phpmyadmin sur hPanel
  2. Identify which database you want to modify, then click Enter phpMyAdmin.
  3. In phpMyAdmin, click on the wp_comments table. Esta imagen le muestra cómo acceder a wp_comments de phpMyAdmin. Cette image vous montre comment accéder à wp_comments depuis phpMyAdmin.
  4. Click on the SQL tab at the top to open the SQL query window. Cette image vous montre comment accéder à l'onglet Requête SQL de la table sélectionnée. Cette image vous montre comment accéder à l'onglet Requête SQL de la table sélectionnée.
  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. Cette image vous montre comment exécuter la requête SQL. Cette image vous montre comment exécuter la requête SQL.
  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 an SQL query to empty the wp_comments and wp_commentmeta tables. This image shows you how to automatically generate an SQL query to empty the 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.

Learn What Else You Can Do With WordPress

How to Duplicate Pages and Posts on WordPress How to Delete WordPress How to Use WordPress Importer WordPress Taxonomy Guide Guide to WordPress Revisions

Was this tutorial helpful?

Yes

No

Auteur Auteur

El autor

Merkys M.

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.

More from Merkys M.

How to Easily Bulk Delete All WordPress Comments

Last updated on August 24th, 2020 by Editorial Staff | Reader DisclosureDisclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

Shares 138 Share Tweet Share Facebook Messenger WhatsApp Email

Do you want to delete all comments from your WordPress site?

It is rare, but on some occasions, a site owner may decide to delete all the comments from their WordPress site. If you have a lot of comments then this could take some time to delete them manually.

In this article, we will show you how to easily bulk delete all WordPress comments.

Easily delete all WordPress comments Easily delete all WordPress comments

Before you Delete All WordPress Comments

There are many legitimate scenarios when a user really needs to delete all WordPress comments without any hesitation.

For example, you filled WordPress with dummy comments on a development site just to see how they would look. You would want to delete those comments before moving to a live site.

There are many other scenarios as well, where a site owner would want to get rid of the comments from their WordPress site.

However, if you just want to delete the spam comments, then take a look at our guide on how to batch delete spam comments in WordPress. If you are upset about comment spam on your WordPress, then make sure you check these tips and tools to combat comment spam in WordPress.

If there are comments showing up on your pages, then take a look at how to disable comments on pages in WordPress.

If none of the above scenarios apply, then continue reading.

First you need to create a complete WordPress backup of your site.

Deleting all comments in WordPress is an irreversible action. You will not be able to undo it once you have deleted those comments. This is why it is important that you have a backup.

Method 1: Deleting All WordPress Comments Using Plugin

The easiest way to delete all WordPress comments at once is by using a plugin.

Note: This action is irreversible and you need to make a complete WordPress backup before moving forward. This will allow you to restore comments if you change your mind.

The first thing you need to do is install and activate the Delete All Comments of WordPress plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Tools » Delete Comments page. This is where you will see the total number of comments on your website and options to delete comments.

Delete all WordPress comments using a plugin Delete all WordPress comments using a plugin

You can choose to delete all WordPress comments, pending comments, spam comments, or comments already in trash.

If you want to delete all WordPress comments, then select ‘All Comments’ option and then click on the Delete Now button.

The plugin will now permanently delete all comments from your WordPress site. Including those in spam and trash.

You can now visit the comments page, and you will see all comments safely deleted from your WordPress site.

Method 2: Delete All WordPress Comments Using phpMyAdmin

You can also quickly delete all WordPress comments using MySQL or phpMyAdmin. This method is only recommended for more advanced users.

Remarque : Cette action est également irréversible. Vous devez faire une sauvegarde complète de WordPress ou au moins faire une sauvegarde de la base de données WordPress avant de continuer.

Connectez-vous au tableau de bord cPanel de votre compte d’hébergement WordPress. Sous la section base de données, cliquez sur phpMyAdmin.

Login to phpMyAdmin Login to phpMyAdmin

Dans phpMyAdmin, vous devrez localiser votre base de données WordPress. Vous verrez une page montrant toutes vos tables de base de données WordPress.

Select and Delete Comment Tables in WordPress Select and Clear Comments Table in WordPress

Marquez la case junto a wp_commentsy wp_commentmetatablas. Le nombre de ces tableaux de commentaires peut différer selon le préfijo de tableau qu’élija durant l’installation de WordPress.

After selecting the comments table, find the ‘With selected:’ dropdown below the table list and select ‘Empty’ from the dropdown.

PhpMyAdmin has now posted an ad that the preguntará if really desea vaciar esas tablas.

Confirm that you want to delete the selected data Confirm that you want to delete the selected data

Haga click on the button if you want to continue. This removes all WordPress comments from its database.

You can also eliminate all comments from WordPress using the MySQL console (command line). Simply start the session on the MySQL console and run this command:

1

2

TRUNCATE `wp_commentmeta` ;

TRUNCATE `wp_comments` ;

That’s all, hope this article helps you learn how to easily eliminate all comments in WordPress. You can also see the new list of essential WordPress addons for business websites

If you’re invited to this article, subscribe to a new YouTube channel for WordPress video tutorials. Also puede encontrarnos on Twitter and Facebook .

Shares 138 Share Tweeter Share Facebook Messenger WhatsApp E-mail

Remove comments from a Word document

Word More… Less

There are two ways to remove or remove comments from a Word document:

  • To delete a single comment in the document, right-click the comment and choose  Delete Comment .

  • To delete all comments in the document, go to the Review  tab , click the down arrow in  Delete and choose  Delete all comments in document .

Read more…

Facebook LinkedIn Email

SUBSCRIBE TO RSS FEED

Do you need more help ?

Develop your skills

EXPLORE TRAINING >

Get new features first

JOIN MICROSOFT MEMBERS >

Google Google translator

Google Google Translate


Video How to delete all comments wordpress

Related Posts

How to add seo keywords in wordpress

Contents1 Cómo agregar palabras clave de SEO en WordPress (aumentar el CTR y las clasificaciones)1.1 Post Title1.2 Headline1.3 Header Tags1.4 Introduction and Conclusion1.5 Body Copy1.6 URL1.7 Meta…

How to embed google calendar into wordpress

Contents1 How to Add a Google Calendar in WordPress (Step by Step)2 Add a Google calendar to your website3 calendario de Google3.1 Versatile plans and pricing4 Video…

How to change the logo in wordpress

Contents1 How to Add a Custom Logo to Your Site Header2 Site Logo2.1 Planes y precios versátiles3 Add, remove or edit a custom logo4 Video How to…

How to add a popup on wordpress

Contents1 Easily create a WordPress emergent form (2 forms)1.1 ¿Por qué usar un formulario emergente de WordPress?1.2 Método #1: Crear un formulario emergente con OptinMonster + WPForms1.3…

How to roll back wordpress version

Contents1 How to Revert WordPress: Undo WordPress Updates (Easy Way)2 How to Downgrade WordPress & Roll Back to a Previous Version2.1 1. A WordPress update included significant changes…

How to rollback wordpress version

Contents1 How to Downgrade WordPress and Revert to an Older Version1.1 1. A WordPress update included significant changes that are not compatible with your theme or plugins1.2…