Upgrading DB >result> Fatal error: Class 'Piwik_Plugin' not found in DoNotTrack.php on line 20

Hello,

I attempted upgrade Piwik today, and received the following error after doing a DB upgrade via command line (php /home/…/Piwik/console core:update):

Fatal error: Class ‘Piwik_Plugin’ not found in /…/…/DoNotTrack.php on line 20

I found this thread http://forum.piwik.org/read.php?2,109835,122289 which suggests using a different Manager.php file, which then gave me a different error (github 404 page at my Piwik log in screen).

I read in another place that if you just overwrite the Piwik installation files (and save the Config.php file to reupload) that would fix the problem.

Solved it on my end. Copied the config file to a save location. Deleted the entire piwiki directory and unpacked the the latest zip file. Copied the config file back and then it works.

!!! The Upgrade Process had already modified the Database for the newsest version !!!

Before I go with that suggestion, I was hoping someone else may have some light to shed on this issue.

Thank you,

LetsFly

To fix this upgrade problem, I deleted the file causing the error (…piwik/plugins/DoNotTrack/DoNotTrack.php) and then ran the database upgrade script again from the command line (php …/home/some-dir/piwik/console core:update).

I then got three more errors from various plugins, and deleted those files/directories. I did this until I got the “upgrade complete” message.

Now everything works perfectly. Hope this helps someone else.

Have a great day,

LetsFly

Thank you Letsfly’s answer worked for me too.