How To Delete All Comments From WordPress

Rifat WordPress Tutorials Jul 21, 2023

WordPress has undoubtedly emerged as one of the most popular content management systems, empowering millions of websites worldwide. Its robust features and user-friendly interface have made it a go-to platform for bloggers, businesses, and online communities. However, managing a website with a substantial number of comments can be overwhelming, especially when dealing with spam or outdated content. If you find yourself in a situation where you need to delete all comments from your WordPress site, fear not! In this article, we will guide you through three efficient methods to achieve this task seamlessly.

Whether you wish to clean up your comment section, start fresh, or combat spam, having a clean and organized comment area can greatly enhance user experience and site performance. By understanding the different methods available, you'll be equipped with the knowledge to delete all comments effortlessly, saving you time and effort.

Throughout this article, we will explore three reliable approaches to removing comments from your WordPress site. We will walk you through the built-in WordPress comment management tools, introduce you to popular plugins designed specifically for comment management, and delve into using custom code for advanced users.

Let's dive into the details and discover how to regain control over your comment section by effectively deleting all comments from your WordPress website!

Create Amazing Websites

With the best free page builder Elementor

Start Now

Why Delete All Comments From WordPress?

There are several reasons why you might need to delete comments from your WordPress website. Here are a few common scenarios where deleting comments becomes necessary:

  1. Spam control: Spam comments can quickly accumulate on popular websites. These comments often contain irrelevant or promotional content, links to malicious websites, or inappropriate language. Deleting spam comments helps maintain the integrity of your website and protects your users from potential security risks.
  2. Outdated or irrelevant content: Over time, comments on your WordPress site may become outdated or no longer relevant to the post or discussion. Deleting such comments helps keep your content up-to-date and ensures that visitors are engaging with valuable and current information.
  3. Comment moderation: Sometimes, comments may violate your website's moderation policy, such as containing offensive language, personal attacks, or inappropriate content. By deleting such comments, you maintain a respectful and safe environment for your users.
  4. Refreshing the comment section: If you're rebranding your website, changing the direction of your content, or revamping your online presence, deleting all comments allows you to start with a clean slate. This can be particularly useful when you want to provide a fresh and consistent experience for your visitors.
  5. Streamlining user experience: Having a cluttered comment section can make it difficult for users to find relevant information or engage in meaningful discussions. By deleting unnecessary or redundant comments, you can enhance the overall user experience and make it easier for visitors to navigate and participate in conversations.


After deleting all comments, it is important to take additional measures to address certain issues that may have arisen. If your site was affected by spam, it is advisable to implement safeguards to prevent bots from accessing your site. This can be achieved by incorporating a CAPTCHA field or opting for an alternative comment plugin that offers enhanced protection against spam.

In the case of hateful or offensive comments targeting your site, utilizing the Auto Comment Moderation plugin can be beneficial. This plugin is designed to identify toxic speech and help you maintain a more positive environment. Additionally, you can blacklist specific commenters by locating their IP addresses in the Comments tab and subsequently adding them to the Comment Blacklist in the Settings > Discussion section.

Furthermore, if you no longer wish to deal with comments altogether, you have the option to permanently disable them using the Disable Comments plugin. This plugin allows you to close comments site-wide, eliminating the need for any further comment management.

By implementing these supplementary measures, you can effectively address potential issues, safeguard your site against spam, moderate comments for a healthier community, and ultimately tailor your comment section to best suit your needs.

Preparation To Delete All Comments

The urge to quickly delete comments may be strong, especially when dealing with spammy links that can harm your website's SEO. However, it is crucial to proceed with caution. Before taking any action, it is always advisable to create a backup of your website and/or database, particularly if you plan to use advanced methods like directly editing the database.

Databases are sensitive entities, and accidental missteps can potentially break your site. Having a backup readily available ensures that any mishaps can be easily rectified, preventing a nightmare scenario. Additionally, you may later regret losing legitimate comments and decide that you want to restore a backup or retrieve specific data from your database.

Regardless of the method you choose, it is considered best practice to back up your entire site before making any significant edits.

In WordPress, comments are stored in the database entries labeled "wp_comments" and "wp_commentmeta," rather than being part of your site files. Instead of backing up your entire website, you can simply export the database.

Many web hosts, including Kinsta, have phpMyAdmin already installed, which is a popular tool for managing databases. If you are not using Kinsta, you can usually access phpMyAdmin through cPanel. It is recommended to contact your web host for instructions on accessing phpMyAdmin and obtaining your login credentials.

For Kinsta users, accessing phpMyAdmin involves logging into MyKinsta, navigating to Sites > Info, and clicking on "Open phpMyAdmin" under the Database section. You can also find your login credentials in this location.

Once you have successfully logged into phpMyAdmin, you will notice an Export button among the available tabs. By choosing the Quick export method and clicking Go, you can download the SQL file containing your exported data.

Alternatively, if you are using Kinsta, you can create a regular backup as explained below and save the corresponding .sql file found in the provided folder.

How To Delete All Comments in WordPress

There are several methods available to completely eliminate WordPress comments.

To achieve this, you can utilize the built-in tools provided by WordPress, although it may not be the most efficient approach. Alternatively, you can opt for plugins specifically designed to remove all comments with just one click, which is the easiest way to accomplish the task. In case neither of these options proves effective, you can directly access the database, but this might be bewildering if you have no prior experience with it.

We will now guide you through each of these methods, enabling you to choose the option that suits your needs and preferences the most.

WordPress Admin Dashboard

To delete WordPress comments, you don't need a plugin or direct access to the database. The necessary functionality is already built into WordPress. Although it can be a bit cumbersome if you're unfamiliar with the interface, the process is similar to bulk editing posts or pages.

To begin, go to your WordPress dashboard and navigate to the Comments section. At the top of the comments table, you'll find a checkbox. Select it to choose all the comments. Next, locate the Bulk Actions dropdown menu and click on it. From the options available, choose "Move to Trash" and then click the Apply button.

Keep in mind that this method only allows you to delete up to 20 comments at a time. If you have more comments to delete, you'll need to repeat the process multiple times.

By default, WordPress clears the trash after 30 days. However, if you want to permanently delete all the comments immediately, go to the Trash tab (located below the Comments heading) and click on the Empty Trash button.

It's worth noting that this method may become challenging when dealing with a large number of comments, such as hundreds or thousands. If you only need to handle a few pages of comments, this approach should work well. However, if you're faced with an overwhelming amount of comments, using a plugin might be more suitable for your needs.

Using a Plugin

Plugins offer a convenient solution for swiftly and effortlessly eradicating a large volume of comments without the need for manual review on a page-by-page basis. Opting for this approach is often the most effective way to clear your comments and begin anew.

Numerous plugins are available to assist you in managing your comments. The initial one we recommend is WP Bulk Delete.

This particular plugin is designed to facilitate the bulk deletion of various elements, such as posts and taxonomy terms. We will demonstrate how to employ it specifically for deleting all comments.

To begin, install and activate the plugin by accessing Plugins > Add New. Once activated, locate the newly added WP Bulk Delete option in the sidebar. Proceed to WP Bulk Delete > Delete Comments and configure the deletion process accordingly.

Ensure that you select all relevant options in the Comment Status section, particularly Approved Comments. If an influx of unwanted comments occurred unexpectedly, you can also specify a particular time period or date in the Comment Date section to delete comments within that range. By doing so, you can preserve your older and legitimate comments. Otherwise, if you wish to delete all comments, you can leave this setting as is.

After you have prepared, select the option "Delete Comments" to initiate the process. Once the process is completed, you will no longer have to address this matter.

An alternative plugin you can consider is Delete All Comments of WordPress. It offers a straightforward solution, allowing you to effortlessly eliminate all comments from your website or specific comments within a category. This plugin does not include any premium features and can be set up instantly and effortlessly.

Simply install the plugin and locate it in the Tools section, specifically under "Delete Comments." Choose the option to delete all comments and click on "Delete Now."

That's it! Whichever plugin you choose, the entire process should be completed within a few minutes.

Using phpMyAdmin

If the bulk deletion feature provided by WordPress is not sufficient, and you prefer not to use plugins or if they are not functioning correctly, such as when attempting to delete a large number of comments at once causing your website to freeze, the next viable option is to directly access the database.

However, it is important to note that this approach is more advanced and not recommended for beginners. Prior to proceeding, it is strongly advised to create a backup of the database for safety purposes.

To begin, confirm whether your web hosting service allows database access, identify the platform they utilize, and gather your login credentials. Keep in mind that not all hosts grant access to the database, in which case you will need to explore alternative methods.

Most hosts employ cPanel, which grants access to phpMyAdmin from the Databases section. If you are a Kinsta user, you can directly log in to phpMyAdmin through the MyKinsta dashboard. Navigate to Sites > Info, and within the Database section, click on "Open phpMyAdmin."

On the left-hand side, you will observe several database tables. Locate the one that corresponds to your website and search for tables named wp_comments and wp_commentmeta in the list. (Note that if your table prefix differs, these names may not commence with "wp_"; simply search for the comments and comment meta tables.)

Select the checkboxes next to these tables, and at the bottom of the screen, click on the "With Selected:" dropdown menu. Change the option to "Empty" (ensure that you choose to empty the tables rather than drop them, as dropping will delete the entire table).

This action will clear all the data from these tables and it will effectively obsolete all the comments from WordPress.

Wrapping Up

In conclusion, understanding how to delete all comments from WordPress gives you greater control over your website's comment section, enhances user experience, and contributes to a more secure and efficient online presence. By implementing the strategies discussed in this guide, you can effectively manage comments and create a positive environment for both you and your visitors. Remember, a well-maintained comment section can greatly contribute to the success and credibility of your WordPress website.

Divi WordPress Theme