I recently faced a significant bot attack on my WordPress site, which resulted in over 55,000 fake user registrations. I have already removed these fake users from both the WordPress users list and the MailPoet subscribers list.
However, I am still experiencing issues with large database tables, and I believe this might be related to the bot registrations. Specifically, some MailPoet-related tables, such as wp_mailpoet_scheduled_task_subscribers, are much larger than expected.
I would appreciate your assistance with the following:
Which MailPoet-related tables can be safely deleted or cleaned up without disrupting the plugin’s functionality?
Thank you in advance for your help.
Screenshots of tables (with database cleaner plugin) sorted by number of rows: https://ibb.co/HHzHrF9
I’m taking a look at the screenshot you sent over and I can see the database tables that you speak about.
These tables serve different purposes for example, we use the mailpoet_scheduled_task_subscribers table to track the users we send newsletters to. That is the main purpose of this table. When creating a newsletter, we insert a row for each subscriber there. When the sending for this subscriber is done, we mark the row as processed. After that, we use the data in this table for the Inactive subscriber’s feature. When we are looking to see if a subscriber is inactive, we look at this table. So if you’re not using the Inactive subscribers feature, you can delete any older processed data.
If you are using the feature, you should keep the data for the period you set up here in MailPoet settings:
Normally neither the size of the table nor the number of tables shouldn’t be an issue unless your hosting company enforces a relatively low DB size limit. In this case, you can either request an increase or eliminate some of the old emails.
Some queries we can suggest in case you want to delete old data:
DELETE FROM wp_mailpoet_sending_queues where sent_at < '2021-01-01';DELETE FROM wp_mailpoet_scheduled_task_subscribers where created_at < '2021-01-01';DELETE FROM wp_mailpoet_statistics_opens where created_at < '2021-01-01';DELETE FROM wp_mailpoet_statistics_clicks where created_at < '2021-01-01';
Ensure to change the desired date and your database prefix before running the query.
Note: We recommend making a backup of the tables before deleting anything.
I would like to know if it’s safe to delete the following tables. The website was active for a while, but I haven’t really started the project yet, and I don’t have any real subscribers. Can I reset the plugin by deleting these tables without breaking the site or the plugin? Will these tables regenerate when new subscribers sign up?