Log in to cPanel and go to the “phpMyAdmin” tool. Use it to export your Matomo database as a MySQL file on your local computer.
Backup Matomo Configuration:
Login to the Cpanel if you already are not, go to the Files section and click on File Manager, and on the new screen double click on publich_html, go to the config folder, and download a copy of your config.ini.php file.
Upgrade Steps:
Download Matomo 5.0:
Use your local machine to download the latest version of Matomo from the official website. https://matomo.org/download/
Backup Matomo Directory:
Via CPanel’s File Manager, create a copy of your existing Matomo directory and save it in a separate location.
Upload New Version to Matomo Directory:
Using CPanel’s File Manager, upload the contents of the extracted Matomo 5.0 directory to your existing Matomo directory.
Update File Permissions:
Check and ensure that the necessary directories and files have the correct permissions. You may need to contact your hosting support for assistance if you encounter permission issues.
Run the Matomo Update Script:
Access your Matomo installation via a web browser and follow the prompts to run the Matomo update script. The script will automatically detect the existing installation and perform the necessary database updates.
Post-Upgrade Steps:
Test Your Matomo Installation:
Verify that your Matomo installation is working correctly by checking the dashboard and testing various features.
Remove the Matomo Backup:
If everything is working well, you can remove the backup created in step 2.
Check Matomo plugins:
If you find some plugins deactivated or in red color, go to the Marketplace and reinstall them. In my case, the following ones were affected.
Custom plugin:
ICustom plugin can not be installed from Market place so go to CPanel, Matomo root directory, and plugin folder and upload the backup of the custom plugin zip file. Extract it, it will become a new folder in the plugins folder, and remove the uploaded backup zip file. In this way, the custom plugin will be restored.
Additional Tips:
Check Matomo System Check section:
There will be some recommendations in the system check sections. Fix those issues.