Completely removing a website


Hi! I was reading faq 73, How to - Analytics Platform - Matomo, but I have two questions:

“Remove completely the tables with a name starting with piwik_archive_”:

as long as I realize, this is wrong if you selected the option to remove old logs, because in this case there isn’t any way to recreate the statistics for the months the logs are already deleted.

The following seems more correct:

DELETE FROM piwik_log_visit WHERE idsite = X;
DELETE FROM piwik_log_link_visit_action WHERE idsite = X;
DELETE FROM piwik_log_conversion WHERE idsite = X;
DELETE FROM piwik_log_conversion_item WHERE idsite = X;

but it doesn’t solve the problem to remove the website from the piwik_archive_* tables.

What about executing the following query for all the Y in the db?

DELETE FROM piwik_archive_Y WHERE idsite = X;

(Matthieu Aubry) #2

Thanks for the feedback! I’ve tweaked the FAQ at: How do I delete all statistics for a given website, or for all websites? - Analytics Platform - Matomo

if it can still be improved please let me know :slight_smile: