»Error: Piwik is already installed«: Strange error after migration to new server

I tried to migrate my piwik installation (version 2.11.1) to a new server. So, I
[li] copied the mysql database
[/li][li] recreated the mysql user
[/li][li] downloaded and unpacked piwik files
[/li][li] set the right permissions
[/li][li] copied the config files from the old installation.

And know, the only thing I get, is the strange error:

Error: Piwik is already installed. 
Go back to Piwik.

What is this about? It seems that for some reason the installation routine is triggered, but why? And what to do?

post scriptum: I am using PHP 5.4.36, MySQL 5.5.41

Hi there

Not sure why you’re having this problem but here is one way you can solve it: backup your config/config.ini.php
then delete it,
go to piwik,
re-install piwik by inputting the same DB and table prefix,
then once re-install you may coy any custom settings from your backedup config.ini.php into your new config.ini.php

Thanks for the answer. Trying what you suggesting I get the message:

Some tables in your database have the same names as the tables Piwik is trying to create 

During the installation process. It is offering me to delete »the detected« tables, but that isn’t exactly what I want. I guess that would lead in data loss. Any other suggestions?

You only see the option to “delete” the tables? that’s strange…

what is the content of your config.ini.php file, which gave you the error in your first post?
(remove the passwords etc.)


was there a solution to this problem? Because I’m having the same. Deleting config.ini.php and installing anew hasn’t helped, as Piwik ceases to function anyway as soon as I try to change the db settings in the new config.ini back to the old db (or more precisely: the new db I have set up with the dump of the old db). I then get the same error message again (already installed). As soon as I set back the db settings in the config.ini back to a fresh db everything works fine.

When I try to set the old db during the installation process I get the exact same message as gunwald - no chance to reuse the old tables. When I use a fresh db that has only been used for another failed piwik installation attempt before I get the option to reuse the old tables.

So, is it far fetched to assume there’s something wrong with the database I imported (tried it multiple times though)? How can I go about this?

Edit: Fwiw, I used MySQLDumper to back up my Piwik database after I had put Piwik in maintenance mode and stopped tracking. The size of the (uncompressed) backup file is 1.6 GB. I copied this file to the new webspace, restored the database content into a newly setup database - with the result described above.

2nd edit: I just saw that there are 133 tables in the original database as well as in the backup - but only 122 of them are restored to the new database, for whatever reason. Working on it now.

I had the same issue after migrating servers. Mine was fixed by downloading the latest piwik and copying the config.ini.php file from the old installation. It said I needed to update my database, which I did, and all works great now!

Good luck.

I am experiencing the same issue, but all I did was physically move the web server to a new location with a new IP address. Nothing else changed. I followed the advice in previous posts and backed up the config.ini.php file. Downloaded new version and replaced the contents of the piwik directory, then copied my old config.ini.php back in and voila - same error. I tried going through a new installation process, but ended up with the same dilemma - delete tables was the only option. I have copied the top section of my config file below. I tried changing the IP address to match the current server IP, but it had no effect.
I read on another forum that it might be an issue with the MySQL installation but there wasn’t a clear path to resolve the issue.

Any ideas?


host = ""
username = "piwikadmin2014"
password = "XXXX
dbname = "dbpiwik"
tables_prefix = “piwik_”