How to safely re-install Piwik after failed update (due to PHP version)

I maintain a Piwik installation on a remote VPS that runs on Ubuntu 10.04. I tried to update my Piwik, but it failed with the following error message and now I can’t access Piwik any longer.

“To run Piwik you need at least PHP version 5.3.3
Unfortunately it seems your webserver is using PHP version 5.3.2-1ubuntu4.28.
Please try to update your PHP version, Piwik is really worth it! Nowadays most web hosts support PHP 5.3.3.”

Unfortunately I am not the administrator and the sys admin does allow non-official sources, so I won’t get this PHP update and will have to downgrade Piwik. As far as I know, Piwik 2.7 is the latest version that still supports PHP 5.3.2.

What is the safest way to get my Piwik running without losing any data?

My strategy would be to use PHPMyAdmin and get a full SQL dump, then install Piwik 2.7 afresh and restore as pointed out in the FAQ.

Is that the right way? Might the update to the latest version have changed my database in a way that makes it non-downwards compatible?

Thanks!

The database doesn’t get updated until the new Piwik install has successfully started and you have logged in with your Superuser credentials.

Save the existing /config/config.ini.php file and blow everything away in the server’s Piwik directory. Upload your Piwik 2.7 files to the server, adjust the permissions on everything as documented elsewhere, restore the previously saved /config/config.ini.php file, and start Piwik. If your previous Piwik version is older than the version you’ve copied to the server, you’ll be prompted to permit a database update after you’ve logged in.

If you’re using the PHP method of Geolocation, you’ll need to copy the latest MaxMind location database to the /misc directory.

PHP 5.3.2 is not maintained nor supported. It’s full of bugs and performance issues. Please consider moving to a host that will let you use technology newer than 5 years old :wink: