View all articles

How to delete Flamingo Inbound Messages in WordPress

If you’re managing a WordPress website and using the Flamingo plugin, at some point you'll probably discover that you need to delete a bunch of form submissions stored in the wp_posts table.

Tracking form submissions, while sensible in some scenarios, it can quickly become a separate issue in itself if not managed and/or maintained regularly.

Just a quick pointer regarding the queries found in the code blocks below; If you find that the queries aren't working for you, just be aware that you may need to change the wp_posts table selector if your WordPress table prefix differs from the default setting.

Delete Flamingo Inbound Messages created more than 3 months ago

Safely test deleting Flamingo Inbound Messages that were created more than 3 months ago.

START TRANSACTION;
DELETE FROM wp_posts
WHERE post_type = 'flamingo_inbound'
AND post_date < DATE_SUB(CURDATE(), INTERVAL 3 MONTH);
ROLLBACK;

To make the changes permanent, just remove START TRANSACTION and ROLLBACK, then rerun the query.

Delete all Flamingo Inbound Messages

Safely test deleting all Flamingo Inbound Messages.

START TRANSACTION;
DELETE FROM wp_posts
WHERE wp_posts.post_type = 'flamingo_inbound';
ROLLBACK;

To make the changes permanent, just remove START TRANSACTION and ROLLBACK, then rerun the query.

Delete Flamingo Contacts created more than 3 months ago

Safely test deleting Flamingo Contacts that were created more than 3 months ago.

START TRANSACTION;
DELETE FROM wp_posts
WHERE post_type = 'flamingo_contact'
AND post_date < DATE_SUB(CURDATE(), INTERVAL 3 MONTH);
ROLLBACK;

To make the changes permanent, just remove START TRANSACTION and ROLLBACK, then rerun the query.

Delete all Flamingo Contacts

Safely test deleting all Flamingo Contacts.

START TRANSACTION;
DELETE FROM wp_posts
WHERE wp_posts.post_type = 'flamingo_contact';
ROLLBACK;

To make the changes permanent, just remove START TRANSACTION and ROLLBACK, then rerun the query.

Final thoughts

Hopefully these snippets will help you avoid any kind of GDPR issues of using the Flamingo plugin for an extended period of time!

If you found this article useful, please do share it on social media.