Matomo database will be upgraded from version 5.0.3 to the new version 5.1.2.
The following plugins will be updated: BotTracker, QueuedTracking.
Important notes for large Matomo installations
If you have a large Matomo database, updates might take too long to run in the browser. In this situation, you can execute the updates from your command line:
php /var/www/html/console core:update
If you manage a high traffic Matomo server, we recommend to momentarily disable visitor Tracking and put the Matomo User Interface in maintenance mode.
FYI: these are the SQL queries and console commands that will be executed to upgrade your database to Matomo 5.1.2
› Click here to view and copy the list of SQL queries and console commands that will get executed
# These console commands will be run:
./console config:set --section="database" --key="collation" --value="utf8mb4_0900_ai_ci"
# These SQL queries will be executed:
ALTER TABLE `matomo_bot_db` ADD COLUMN `botType` TINYINT(0) UNSIGNED NULL DEFAULT 0;
ALTER TABLE `matomo_bot_db` CHANGE `botName` `botName` VARCHAR(256);
ALTER TABLE `matomo_bot_db` CHANGE `botKeyword` `botKeyword` VARCHAR(256);
ALTER TABLE `matomo_bot_db_stat` CHANGE `page` `page` VARCHAR(256);
ALTER TABLE `matomo_bot_db_stat` CHANGE `useragent` `useragent` VARCHAR(256);
CREATE TABLE `matomo_bot_visits` (`id` bigint unsigned NOT NULL AUTO_INCREMENT, `botId` INT UNSIGNED, `idsite` INT UNSIGNED, `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ( `id` )) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
CREATE TABLE `matomo_bot_type` (`id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(256) NOT NULL, `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ( `id` )) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
INSERT INTO `matomo_bot_type` (`name`) VALUES ('Monitoring & Analytics');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('Search Engine Optimization');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('Advertising & Marketing');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('Page Preview');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('Webhook');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('Social network');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('Scraper');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('Copyright');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('Search Engine Crawler');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('AI Search Crawler');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('AI Data Scraper');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('AI Assistant');
INSERT INTO `matomo_bot_type` (`name`) VALUES ('Other');
CREATE TABLE `matomo_bot_device_detector_bots` (`id` INT(11) NOT NULL AUTO_INCREMENT, `idsite` INT UNSIGNED, `useragent` VARCHAR(256) NOT NULL, `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ( `id` )) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
ALTER TABLE `matomo_bot_type` CHANGE `name` `name` VARCHAR(256);
Need help upgrading Matomo?
If you need support to upgrade your Matomo, the creators of Matomo are here to help you make the Matomo upgrade a success and provide all instructions, best practises and ongoing support. Contact the Matomo experts to get started upgrading your Matomo safely.
Ready to go?
The database upgrade process may take a while, so please be patient.