Update

  1. What version of Piwik do I have?
  2. What should I do when I want to update Piwik to the latest version?
  3. How do I backup my MySQL database?
  4. How do I restore my MySQL database?
  5. How do I enable Maintenance mode (to display a maintenance message in Piwik, and disable tracking) prior to updates?
  6. What should I do when the upgrade failed with "Syntax error or access violation: 1142 INDEX command denied to user"
  7. After the update, I get sql errors, I would like to try the update again. How do I force Piwik to re-upgrade the database from a past version?
  8. I would like to test early beta and RC releases, how do I enable automatic updates to use these development versions?

Answers

  1. What version of Piwik do I have?

    There are two ways to know which version of Piwik you are using:

    • The About Piwik X.Y box:
    • File core/Version.php: you can download from your FTP server the file piwik/core/Version.php - inside this file will be the version number you are currently using.
  2. What should I do when I want to update Piwik to the latest version?

    Updating Piwik is easy and we hope you will always use the latest version of Piwik! It is possible to update from any old version to the latest one. Please see the Update guide for further instructions.

  3. How do I backup my MySQL database?

  4. How do I restore my MySQL database?

  5. How do I enable Maintenance mode (to display a maintenance message in Piwik, and disable tracking) prior to updates?

    You can set a setting in your config/config.ini.php file as explained in this FAQ.

  6. What should I do when the upgrade failed with "Syntax error or access violation: 1142 INDEX command denied to user"

    Ask your sysadmin to GRANT your database user INDEX privilege. This is required to CREATE, DROP, and ALTER indexes, and allow Piwik to update successfully.

  7. After the update, I get sql errors, I would like to try the update again. How do I force Piwik to re-upgrade the database from a past version?

    It happens in rare cases that Piwik believes it has upgraded to a new version (when using the latest PHP/JS files), but that the database itself was not upgraded. This FAQ explains how to re-run the database upgrade from a particular version.

    For example, this could happen if the database crashed or overloaded during the DB upgrade (we recommend to enable maintenance and run the ugprade in the command line). It could also happen if the new Piwik files in core/Updates/ haven't yet been uploaded to the latest files, but a Piwik user visits the Piwik UI and issues the partial upgrade leading to the errors.

    As a result SQL error messages are often printed in some - or all - the reports. Errors messages such as Error trying to execute the query 'CREATE TABLE [...] Base table or view already exists: 1050 Table exists or SQLSTATE[42S22]: Column not found: 1054 Unknown column on clause or SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP X check that column/key exist or Error trying to execute the query 'ALTER TABLE' SQLSTATE[42S22]: Column not found: 1054 Unknown column

    The good news is that it possible in all cases to resolve the issue and not experience any data loss or other problem!

    You can manually tell Piwik to run the upgrade again from the version you last good version, by running the following SQL query (eg. using a tool such as phpMyAdmin):

    UPDATE `piwik_option` SET option_value = "1.X" WHERE option_name = "version_core";

    Replace 1.X with the version you were using prior to upgrading, for example "1.10". After running this query, visit Piwik: you should see the upgrade screen again. You can run the upgrade in the command line if your Piwik is large, or simply click the button and wait until completion.

    If you still have problems, you can get help in the forums or contact Professional Services for paid support by us.

  8. I would like to test early beta and RC releases, how do I enable automatic updates to use these development versions?

    In your config/config.ini.php add the following code:
    [Debug] allow_upgrades_to_beta=1

Feedback on this page

Have you found an error in this page, or do you think some information is missing or not clear? We appreciate you taking the time to send us your suggestions and feedback on this page.