In some very rare cases, it might be useful to force Piwik to re-process the reports from the original logs. By default, reports will only be processed once (preferably with an automatic cronjob setup to run every hour) and then archived in the database. When you visit the Piwik UI for a previous day (or week, month, etc), all you see is pre-processed data read directly from these archive tables.

Warning: to reprocessing reports for specific dates, you need access to the historical visitor Log Data. Make sure you are not using the feature ‘Delete old logs‘ on your Piwik server. If you have deleted some of your old logs, Do Not Proceed! Some of your data could be lost forever.

It is possible to force Piwik to re-process your reports in few different ways:

  • (Recommended) To reprocess reports for a specific day, or specific period, you can delete the two Mysql tables piwik_archive_* for the specific month containing the dates to re-process. To delete the tables, you can use a tool such as phpMyAdmin which is usually provided by your web host.
  • If you wish to reprocess archiving for all reports for all dates, you will have to delete all piwik_archive_* tables in the Piwik Mysql Database. To delete report data for one full year including monthly reports, you may have to delete up to 24 tables (12 months * 2 tables).
    The next time you login your Piwik, it will automatically detect that the archives are missing, re-create the tables, and also re-trigger the processing of the report data. This may take one second on a small website, but it could take several minutes for bigger websites. Use the archive.php script to trigger all reports data processing at once.
  • You can also call the API to tell Piwik that old data was imported
  • Alternatively, you can edit your config/config.ini.php file, and set:

    [Debug]
    always_archive_data_day=1
    

to force archiving of the daily reports, and/or

[Debug]
always_archive_data_period=1

to force archiving for all period reports (week, month, year). If you then visit the Piwik UI for a given date, reports will be re-processed. When you are done, do not forget to set these values back to 0

[Debug]
always_archive_data_day=0
always_archive_data_period=0