GLPI Update (with GLPI 11 Upgrade investigation)
Turn ON Maintenance Mode
Before backing up, you must enable maintenance mode.
cd /var/www/glpi php bin/console glpi:maintenance:enable
Backups
First, you have to backup some data before processing any upgrade
-
backup your database;
mysqldump -u root -p --databases glpi > /root/backup/glpi-oldversion.sql-
backup your config directory, especially for your GLPI key file (config/glpi.key or config/glpicrypt.key) which is randomly generated; backup your files directory, it contains users and plugins generated files, like uploaded documents; backup your marketplace and plugins directory.
mkdir /root/backup/backup_glpi/glpi-old_versioncp -Rf /var/www/glpi/ /root/backup/backup_glpi/old_version
Check soft version
Before attempting any upgrade, you need to check the version of the software to make sure if it is compatible!
cd /var/www/glpi php bin/console glpi:system:check_requirementsphp bin/console glpi:database:check_schema_integrity|
GLPI 10.0.5 |
GLPI 10.0.10 |
GLPI 11.0.0 |
|
PHP Minimum : 7.4 PHP Maximum : 8.2 |
PHP Minimum : 7.4 PHP Maximum : 8.3 |
PHP Minimum : 8.2 PHP Maximum : ?? |
|
MariaDB Minimum : 10.2 |
MariaDB Minimum : 10.2 |
MariaDB Minimum : 10.5 |
|
Ubuntu 20.04 LTS |
Ubuntu 22.04 LTS |
Ubuntu 24.04 LTS |
|
PHP 7.4 |
PHP 8.1 |
PHP 8.3 |
|
MariaDB 10.3 |
MariaDB : 10.5 |
MariaDB : 10.6 |
With this example, you can see that GLPI 10.0.10 requires Ubuntu 20.04 minimum.
But GLPI 11.0.0 requires Ubuntu 22.04 minimum.
Do not upgrade your system or GLPI without checking the versions of the components supported by GLPI !
Update GLPI version
Remove the old GLPI version
rm -Rf /var/www/glpi/Download the latest GLPI version and uncompress it
cd /root
wget https://github.com/glpi-project/glpi/releases/download/XX.X.X/glpi-XX.X.X.tgz
tar -xvf glpi-XX.X.X.tgzMove it to the right location and add the version number in the folder name
mv glpi /var/www/glpiRestore Data
cp -Rf /root/backup/backup_glpi/your_version/glpi/files /var/www/glpi/
cp -Rf /root/backup/backup_glpi/your_version/glpi/plugins /var/www/glpi/
cp -Rf /root/backup/backup_glpi/your_version/glpi/config /var/www/glpi/
cp -Rf /root/backup/backup_glpi/your_version/glpi/marketplace /var/www/glpi/
Change the symlink to make it point on the latest version (and ensure the file are owned by www-data)
chown -R www-data:www-data /var/www/glpi/Check the database integrity
cd /var/www/glpi/latest/bin
php console db:checkIf all good then update the database
cd /var/www/glpi/bin
php console db:updateRemove the installer
rm /var/www/glpi/install/install.phpGLPI should now be updated.