Hi @maaike53,
Thanks for reaching out, and I sincerely apologize for the delay in getting back to you.
The viw_wpml_mails table is used by WP Mail Logging to store logs of the emails sent from your site. When you create a staging site, all the data from your live site is copied, including the email logs. It’s possible that this duplication is causing a huge increase in your database size on the staging site.
Here are a few steps you can take to resolve this:
1. Clear Old Email Logs: Before creating your staging site, you can clear old logs to reduce the size of the viw_wpml_mails table.
To do this, go to WP Mail Logging > Settings. Under the Log Rotation section, configure the plugin to automatically delete logs older than a certain period or after a certain number of emails have been logged. (https://a.supportally.com/i/QCw92C). This will help keep the table size manageable.
2. Exclude the viw_wpml_mails Table from Staging: If your staging tool allows it, exclude the viw_wpml_mails table from being copied to the staging site. This will prevent the large table from bloating your staging database. Then your staging site can begin accumulating its own email logs.
I hope this helps. Thanks ??