Remove WordPress comments in the database


You can can remove WordPress comments from within the database. This can be helpful if you need to quickly remove a large amount of SPAM comments.

  1. Log in to phpMyAdmin.
  2. Select your WordPress database from the left-hand menu.
  3. Click the wp_comments table (the prefix may not be wp_ if a custom table prefix was used).
  4. Locate the comments you wish to remove.
  5. Tick the checkbox next to each comment, or use Check all to select multiple comments.
  6. From the With selected: dropdown menu, choose Delete.
  7. Confirm the deletion when prompted.

Additional Notes

- Always take a database backup before making changes directly in phpMyAdmin.
- If the site uses a custom table prefix, the comments table may be named something other than wp_comments (for example, abc_comments).
- Deleting comments directly from the database bypasses the WordPress recycle/trash functionality and cannot easily be undone without a backup.



Article ID: 1220
Created On: Tue, Nov 17, 2020 at 6:49 PM
Last Updated On: Tue, Jun 16, 2026 at 9:02 AM

Online URL: https://www.heartinternet.uk/support/article/remove-wordpress-comments-in-the-database.html