Piwik 3.0 database upgrade error

Just had this issue upgrading from 2.15.*. It’s a known issue. Easiest way I found was to:

  1. Backup existing install of latest version (3.0.4 in my case)
  2. Install Piwik 2.17.0
  3. Delete config folder and move config folder from existing install to 2.17.0
    — NB: I moved the whole config folder but you can just move config/config.ini.php
  4. Visit site to perform database upgrade to 2.17.0
  5. Restore latest version and move the config folder from the 2.17.0 install back into latest.
  6. Visit site to perform databaseupgrade to latest install.

This process removes any need to manually mess around with SQL tables, because bad things can happen when you start dropping things…