Home » Categories » Managed WordPress » Advanced

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.

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
Related Articles
Update WordPress permalinks in the database
Added on Tue, Nov 17, 2020
Update WordPress database connection string
Added on Tue, Nov 17, 2020
Disable trackbacks and pingbacks in WordPress
Added on Tue, Nov 17, 2020
Disable external WordPress comment requests
Added on Tue, Nov 17, 2020
Change PHP settings for my hosting account
Added on Tue, Nov 17, 2020