Hi, We’re using Matomo On-Premise (v5.3.1) and have enabled “Regularly delete old raw data” with a 1-day retention period. However, the cleanup is not working at all—neither for active nor deleted sites. Despite all recommended settings and scheduled tasks being enabled and executed, old raw data remains untouched.
What We Tried Testing:
Matomo version: 5.3.1
Enabled in config/config.ini.php:
delete_logs_enable
= 1
delete_logs_older_than
= 1
enable_auto_database_cleanup
= 1
Executed scheduled tasks manually:
php /var/www/html/console core:run-scheduled-tasks
→ Tasks complete with no errors, but no data deleted.
Ran deletion manually:
php /var/www/html/console core:delete-logs-data --dates=2025-04-01,2025-05-06
→ “Successfully deleted 0 visits.”
Verified in DB that visit logs older than 1 day still exist.
Added missing setting via DB:
INSERT INTO matomo_option (option_name, option_value, autoload)
VALUES ('delete_data_all_sites', '1', 1)
ON DUPLICATE KEY UPDATE option_value = '1';
Still no raw data is being deleted.
What We’re Trying to Confirm:
We’d like help understanding how raw data deletion is supposed to work in this setup:
Is there something else we must configure to make raw data cleanup function?
Should deleted sites’ data be cleaned automatically after the retention period?
Is there a bug in 5.3.1, or does this require a premium plugin to fully enable?
Any insights on this would be greatly appreciated.
Thanks,
Ram