Piwik 3.0 database upgrade error

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘piwik.piwik_plugin_setting’ doesn’t exist

How do I fix this?

1 Like

same problem here… can someone paste the sql to create this table ?

Error appeared for me upgrading from 2.13 to 3.0 (afaik)

I ran into the same issue
The sql to create that table can be found on Github(Mysql.php:79), it would be:

CREATE TABLE piwik_plugin_setting (
plugin_name VARCHAR(60) NOT NULL,
setting_name VARCHAR(255) NOT NULL,
setting_value LONGTEXT NOT NULL,
user_login VARCHAR(100) NOT NULL DEFAULT ‘’,
INDEX(plugin_name, user_login)

But I then get the next error;

  • SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘plugin_name’ in ‘where clause’

EDIT: The above was caused by piwik_site_setting not having the plugin_name column, you might have to DROP piwik_site_setting (Backup your data!) and run the following;

CREATE TABLE piwik_site_setting (
plugin_name VARCHAR(60) NOT NULL,
setting_name VARCHAR(255) NOT NULL,
setting_value LONGTEXT NOT NULL,
INDEX(idsite, plugin_name)

UPDATE: It completed but with the following warning, Googling that (or part of it) gives no info on how to resolve it though

[!] Warning messages:
* You are not allowed to change the value of the setting "enable_plugin_update_communication" in plugin "CoreUpdater"
The update completed successfuly, however there were issues during the process. Please read the above descriptions for details. For further help:

After this Piwik finally loaded but a lot of dahboard modules said “ViewDataTable ID ‘table’ is already in use!”

I was able to solve this by removing > plugins/CoreVisualizations/Visualizations/HtmlTable/PivotBy.php
as described in this post

The update documentation didn’t seem to mention any issues updating from older versions to 3.0, and it doesn’t give the option to update incrementally either?
Not updating incrementally seems to be the cause according to this Github issue;


I had the same error message on a fresh installation of Piwik and in my case the first SQL-statement already helped to solve the problem.
Thank you!

Had the exact same issue with non existing “piwik_plugin_setting” table ; had to create it using SQL command. After that, a new error on “piwik_site_setting” table :

For this i had to drop the table and recreate it with the missing field.

That makes quite a lot of blocking errors for one update …

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…