Guides & Tutorials January 19, 2025

Upgrade Matomo

1. Log in to the Matomo VM via SSH 2. Run the following command to perform any database upgrade: sudo /var/www/html/console core:update 3. Remove the added values from step 2. 4. Perform the Matomo system check to determine if there’s any issue that should be
Upgrade Matomo
  1. Log in to the Matomo VM via SSH
  2. Run the following command to perform any database upgrade: sudo /var/www/html/console core:update
  3. Remove the added values from step 2.
  4. Perform the Matomo system check to determine if there’s any issue that should be fixed

Clean-up the results from step 3 by executing:

rm /tmp/matomo.zip # delete the archive and read below the next step
rm /tmp/config.ini.php # delete the backup config file
rm -r /tmp/matomo

Run the following commands to make a backup of the config file, download the latest version of Matomo:

cp /var/www/html/config/config.ini.php /tmp/config.ini.php # Copy the original config file
wget https://builds.matomo.org/matomo.zip -P /tmp # Download the latest Matomo version
unzip -o /tmp/matomo.zip -d /tmp/matomo # Unzip the Matomo archive
sudo cp -r /tmp/matomo/matomo/* /var/www/html/ # To copy the unzipped archive to the Matomo installation directory

Edit (as root) the file /var/www/html/config/config.ini.php and add the lines below to temporarily disable Matomo tracking and disable the Matomo user interface and API. This will cause measuring requests to not be processed and tracked by Matomo, to speed up the upgrade:

[Tracker]
record_statistics = 0
   
[General]
maintenance_mode = 1