Matomo 5 comes with minor database schema changes only, which won’t need to be reverted. Nevertheless, please read the instructions fully before proceeding with the steps.

  • We recommend making a backup of your code and database if any possible. If you still have a backup from before upgrading to Matomo 5, try to use the backups instead of following below steps.
  • If you have a high traffic site we recommend enabling the maintenance mode.
  • Download the latest version of Matomo 4.
  • Extract the zip and replace the files on your server using the following instructions from the manual update process. The idea is that you basically remove all existing files except for config/config.ini.php and then copy over the new files. If you were using any plugins from the Marketplace, you will need to download them again from the Marketplace.
  • Execute below queries on your database. You may need to adjust the matomo_ prefix depending on your DB table prefix.

    UPDATE matomo_option set option_value = '4.14.2' where option_value like '5.0.0%';
  • You can now disable the maintenance mode if you enabled it previously
  • Open the Matomo UI
  • You might be presented with another MySQL update changing a few more columns which you can execute either using the UI directly or on the command line should your database size be larger.
  • You should now be able to use Matomo 4.