CONTACT US: 1-800-622-4403
ABOUT    CONTACT SALES    SERVICE AREAS
Domains To Datacenter Since 1994

How to delete WordPress Comments using phpmyadmin


In certain situations removing unwanted comments within WordPress can be a cumbersome and time consuming process. Out of the box your only option is to adjust the number of comments per page via Screen Options (top right of screen) within the WordPress Dashboard. Well if you accidentally forgot to disable comments on a particular page, post, product, or media (be sure to disable attachment pages) you could have thousands of comments and unfortunately WordPress limits you to seeing a max of 999 items per page. Here is a quick and easy way to delete all comments using phpmyadmin:

1. Login to your customer control panel via https://cp.infoquest.com > click the "More Services" Tab > click "Databases"

2. Next you will want to click the specific database name for the specific database you're using for WordPress (verify db within wp-config.php)

3. After you click the database name you will see a link to "Browse database manager" which will open phpmyadmin.

4. Within phpmyadmin, in the top left corner, click your specific database name (ie db1000000_sa000_main) to load your Tables.

5. Once you see a list of database Tables > click "wp_comments" (Note: In case your db tablle prefix is not "wp_" then replace the "wp_" below prefix with yours)  > at the top, click "SQL" to open the SQL queries window. Here are a list of various ways to delete WordPress comments:

If you want to remove NON APPROVED COMMENTS then run the following query:
DELETE from wp_comments WHERE comment_approved =  '0'
If you want to remove ALL PENDING COMMENTS then run the following query:
DELETE from wp_comments WHERE comment_approved =  '0'
If you want to remove ALL APPROVED COMMENTS then run the following query:
DELETE from wp_comments WHERE comment_approved =  '1'
If you want to remove ALL TRASH COMMENTS then run the following query:
DELETE from wp_comments WHERE comment_approved = 'trash'
If you want to remove ALL SPAM COMMENTS then run the following query:
DELETE from wp_comments WHERE comment_approved = 'spam'

Websites

  1. How To Install WordPress
  2. Hosting Multiple Domains on One IP Address (SuperAccount)
  3. Where can I find the FTP information for my POA account?
  4. How to modify CSS on Mobile Devices
  5. How to generate a CSR, purchase & Install the Certificate in the POA System
  6. Change Your Domain Name using WordPress
  7. How to enable .NET 4.0 for your POA Account.
  8. How to remove Pages/Posts from Wordpress Search
  9. How to disable all Wordpress plugins using MySQL
  10. Remove index.php from Wordpress URL
  11. How to move a Drupal site from one host to another
  12. How to move a Wordpress site from one host to another
  13. How to change the Wordpress site URL
  14. Masking Your Email from Spammers with WordPress + PHP
  15. How to Redirect a Registered Domain
  16. Changing the Wordpress URL Path to web root "/" or another path
  17. Simple Way to Secure a WordPress Website
  18. How to restart your website in Control Panel.
  19. How to Block Referral SPAM from your Website
  20. Creating Campaigns in Google Analytics
  21. Switching over to a New InfoQuest account.
  22. Stopping your website through the customer control panel.
  23. Deleting a domain from your account.
  24. Where do I go to view my web stats (AWStats) for my site?
  25. How to change Wordpress siteURL to IP address using phpmyadmin
  26. How to enable "anonymous access" to browse my site.
  27. How to access Wordpress files.
  28. How to add a dedicated/exclusive IP address to your account.
  29. How to upload website content to the server.
  30. Update Directory Path for Website.
  31. Password protecting a folder on your site on POA.
  32. Add Structured Data Location Schema to your website
  33. How to delete WordPress Comments using phpmyadmin
  34. How to password protect a specific directory on your POA Hosting Account.
  35. What's New in Wordpress 4.9

Feedback and Knowledge Base