Steps for Updating to Matomo 5
To update your Matomo to version 5, follow these steps:
1. Check Requirements
Although Matomo 5 will technically run on PHP 7.2.5 and MySQL 5.5, you should definitely use current base technologies. That means PHP at least version 8.2 and MySQL version 8.4.
2. Create a Backup
Back up your current installation by copying the matomo folder on the server and exporting the database. For example:
cp -rp matomo <PATH-TO-SAFE-DIRECTORY>/matomo_alt
mysqldump -h<HOST> -u<USER> -p <MATOMO-DATABASE> -r matomo_dump.sql
3. Install Matomo 5.x.y
Download the current Matomo version and install it in the parent directory of matomo:
wget builds.matomo.org/matomo.zip
unzip -o matomo.zip
rm matomo.zip
This overwrites the old installation (your individual configuration files are not affected).
4. Run the Update
Delete any files from the installation that are no longer needed and run the Matomo database (structure) update:
cd matomo
./console diagnostics:unexpected-files --delete
./console core:update
You can now log in again and test. Good luck!