How to Bulk Delete and Manage Spam in Flamingo
Content
If your WordPress site uses Contact Form 7, you've likely installed the Flamingo plugin to save form submissions. A common and frustrating issue many users encounter is the accumulation of thousands of spam messages with no straightforward way to manage or delete them in bulk. This guide will explain why this happens and provide the most effective solutions for cleaning up your Flamingo database.
Why Flamingo Spam Piles Up
Flamingo is designed to store all Contact Form 7 submissions, including those marked as spam by anti-spam plugins like Akismet or CleanTalk. By default, it includes an auto-delete feature that should move spam to trash after 30 days and delete it permanently after another 30 days. However, many users report that this feature does not work consistently, leading to a massive backlog of spam messages. The WordPress admin interface only allows you to delete messages in small batches, which is impractical for sites receiving high volumes of spam.
Effective Solutions for Bulk Spam Management
1. Increase Items Per Page in Screen Options
The simplest method within the standard WordPress admin is to increase the number of items displayed on a single page.
- Navigate to Flamingo > Inbound Messages.
- Click the Screen Options tab in the top-right corner.
- Increase the Number of items per page field to a higher value (e.g., 999).
- Click Apply.
- Now, you can select all messages on the page and use the Bulk Actions dropdown to move them to trash or delete them permanently.
Note: Some users report that attempting to delete a very large number of messages at once (e.g., several thousand) can cause server timeouts or 502 errors. If this happens, try deleting in smaller batches.
2. Manual Database Cleanup (Advanced Users)
For users comfortable with phpMyAdmin or similar database management tools, running SQL queries is the most efficient way to delete vast quantities of spam data instantly. WARNING: Always create a full backup of your database before proceeding.
To delete all spam messages and their associated data, you can run queries similar to these:
DELETE FROM wp_posts WHERE post_status = 'flamingo_spam'; DELETE FROM wp_posts WHERE post_status = 'trash' AND post_type = 'flamingo_inbound';
To also remove spam entries from the Flamingo address book, a more complex process is required to identify and delete email addresses associated with spam messages. This typically involves cross-referencing the `wp_posts` and `wp_postmeta` tables.
3. Using Custom Code to Prevent Spam Storage
If you want to stop Flamingo from saving spam submissions in the first place, you can use a filter hook. Adding the following code to your theme's functions.php file can help prevent spam from clogging your database. This is especially useful if you use a third-party anti-spam solution and are confident in its accuracy.
add_filter( 'wpcf7_flamingo_submit_if', 'skip_flamingo_on_spam', 10, 1 );
function skip_flamingo_on_spam( $case ) {
if ( 'spam' === $case ) {
return false;
}
return $case;
}
Addressing Common Related Issues
- Bulk Actions Not Working: Some threads indicate the bulk action functionality can sometimes fail. This is often a conflict with another plugin or theme. A standard troubleshooting step is to deactivate other plugins temporarily to see if the issue resolves.
- Exporting Spam/Trash: The native export feature in Flamingo only works for the Inbox. Exporting from Spam or Trash is not supported by default, though community members have proposed code modifications to enable this functionality.
- Spam in Address Book: Flamingo does not automatically remove contacts from its address book when their messages are marked as spam. This must be done manually or through custom database queries.
Conclusion
Managing spam in Flamingo is a known pain point for many users. While the plugin lacks a one-click "Empty Spam" button, the methods outlined above—from using Screen Options for larger batches to carefully executing database queries—can help you regain control over your database. For most users, increasing the items per page is the safest and most effective first step. The 'Flamingo' team is aware of these community requests for improved bulk management tools.
Related Support Threads Support
-
Bulk actions not working (move to trash/mark as spam)https://wordpress.org/support/topic/bulk-actions-not-working-move-to-trashmark-as-spam/
-
how to bulk export flamingo spam?https://wordpress.org/support/topic/how-to-bulk-export-flamingo-spam/
-
Proposed Update: Allow Exporting of Trash and Spamhttps://wordpress.org/support/topic/proposed-update-allow-exporting-of-trash-and-spam/
-
Auto Delete Spam – DOESN’T WORKhttps://wordpress.org/support/topic/auto-delete-spam-doesnt-work/
-
Rename Spamhttps://wordpress.org/support/topic/rename-spam/
-
Compatibility with Anti-spam by CleanTalk (Feature Request)https://wordpress.org/support/topic/compatibility-with-anti-spam-by-cleantalk-feature-request/
-
Spam cleanup for Flamingo message storagehttps://wordpress.org/support/topic/spam-cleanup-for-flamingo-message-storage/
-
Flamingo 3 lines of body in SPAM previewhttps://wordpress.org/support/topic/flamingo-3-lines-of-body-in-spam/
-
IP Logging?https://wordpress.org/support/topic/ip-logging-1/
-
Remove authors of spam from address bookhttps://wordpress.org/support/topic/remove-authors-of-spam-from-address-book/
-
Auto-Trash All Submissions (Not only Spam)https://wordpress.org/support/topic/auto-trash-all-submissions-not-only-spam/
-
Delete all spamhttps://wordpress.org/support/topic/delete-all-spam/
-
Spam and Saved contactshttps://wordpress.org/support/topic/spam-and-saved-contacts/
-
list with no contenthttps://wordpress.org/support/topic/list-with-no-content/
-
Spam Managementhttps://wordpress.org/support/topic/spam-management-2/
-
Download all Spam entries and feed them to ChatGPThttps://wordpress.org/support/topic/download-all-spam-entries-and-feed-them-to-chatgpt/
-
Can't Export from Trash or Spam!https://wordpress.org/support/topic/cant-export-from-trash-or-spam/
-
Save Inbound Messages In "Archived" Or Similarhttps://wordpress.org/support/topic/save-inbound-messages-in-archived-or-similar/
-
lot of spam in Flamingo Address Book + spam messageshttps://wordpress.org/support/topic/lot-of-spam-in-flamingo-address-book-spam-messages/
-
More of 10.000 messages in the spam folder…https://wordpress.org/support/topic/more-of-10000-messages-in-the-spam-folder/
-
Pagination of messages only allows 20 to show at a time.https://wordpress.org/support/topic/pagination-of-messages-only-allows-20-to-show-at-a-time/
-
Remove Spam Contacts from Flamingo (Contact Form 7)https://wordpress.org/support/topic/remove-spam-contacts-from-flamingo-contact-form-7/
-
Delete All the Crap Spamhttps://wordpress.org/support/topic/delete-all-the-crap-spam/
-
Deleting spam messages takes hourshttps://wordpress.org/support/topic/deleting-spam-messages-takes-hours/
-
Stop databasing spam?https://wordpress.org/support/topic/stop-databasing-spam/