# Updating GLPI

{% embed url="<https://www.youtube.com/watch?v=TR-NRIErTP8>" %}

This page covers how to update to a new GLPI release.&#x20;

* [**Release notes on Github**](https://github.com/glpi-project/glpi/releases)

{% hint style="warning" %}
This procedure is based on the GLPI installation carried out in the following article:\
\ <a href="install_glpi" class="button secondary">Install GLPI on Ubuntu</a>
{% endhint %}

## Updating GLPI Network Cloud

***

If you're on a [GLPI Network Cloud](https://glpi-network.cloud/prices/) plan, we'll upgrade your GLPI automatically with each new release; no action needed on your end (unless you're using the GLPI Network Cloud Private offer – so you may ask the upgrade on demand)

How soon we upgrade your instance depends on the type of release:

* Security fixes: One week before the public release
* Minor releases (e.g., 10.0.18 to 10.0.19): Usually about a week
* Major releases (e.g., 10.0.20 to 11.0.0): Longer, usually months (just to make sure everything goes smoothly)

[GLPI Network Cloud Private](https://glpi-network.cloud/fr/private-cloud/) customers can request an update at support.teclib.com. Include the URL of the GLPI Network Cloud instance you want us to upgrade.

## Updating a Self-Hosted GLPI

***

{% hint style="success" %}
This page covers the updating process of an instance that was installed following [this article](https://help.glpi-project.org/tutorials/procedures/install_glpi). If your **installation was made with different steps, please make sure to adapt commands and paths according to your environment.**
{% endhint %}

Here are the steps for updating to a new GLPI version (major or minor):

1. **Back up of your application database and files**

The application database keeps track of everything of your GLPI instance. It is very unlikely you'll need to roll back to your current version, nevertheless it is always great to have a point of coming back in case something goes wrong.

{% hint style="warning" %}
Never try to import a GLPI database backup to a different version without using the update scripts contained here.

You should not try to restore a database backup on a non empty database (say, a database that has been partially migrated for any reason).

**Make sure your database is empty before restoring your backup and try to update, and repeat on fail.**
{% endhint %}

2. **Download latest GLPI version**

On <http://glpi-project.org/download>, find the latest version, and download it to your server, and extract it to an empty folder where your Web Server may find it.

```sh
wget https://github.com/glpi-project/glpi/releases/download/x.x.x/glpi-x.x.x.tgz
```

3. **Ensure target directory is empty and extract files there**

```sh
cd /var/www/html
tar -xzf glpi-x.x.x.tgz
```

4. **Restore the `downstream.php` file previously backed up**

{% hint style="success" %}
This procedure follows the standard **Filesystem Hierarchy Standard (FHS) to clearly separate critical elements**: configuration files **(including the encryption key),** application sources, variable data, and logs.&#x20;

This organization strengthens the **security and maintainability of the instance**. For more information, see the [installation article](https://help.glpi-project.org/tutorials/install_glpi#filesystem-hierarchy-standard-breakdown).
{% endhint %}

```sh
cp ..glpibackup/inc/downstream.php /var/www/html/glpi/inc
```

5. **Update GLPI**

Open the GLPI Instance URL on your browser, or (recommended) use the `php bin/console db:update` [command line tool](https://glpi-install.readthedocs.io/en/latest/command-line.html#cdline-update)

The command line tool will check the integrity of your database to identify changes that could compromise the update, and run migrations to update GLPI

{% hint style="warning" %}
As soon as a new version of GLPI files is detected, you will not be able to use the application until the update process has been finished.
{% endhint %}

6. [**Update and enable the plugins**](https://help.glpi-project.org/tutorials/plugins/install-update_plugins#updating-a-plugin)

{% hint style="info" %}
Update process will automatically disable your plugins. So make sure to enable them again after updating them.
{% endhint %}

## Specific migration of GLPI 10 plugins to GLPI 11

Here you will find the procedure to migrate GLPI 10 to GLPI 11, as well as the following plugins:

* **Generic Objects** (now included in the core)
* **Fields** (required if you use Fields with FormCreator)
* **FormCreator** (now included in the core)

{% hint style="warning" %}
We recommend updating these three plugins before beginning your migration. This will save you from having to install the plugins on your new instance in order to prepare for their migration. Fields, however, must be installed in all cases.
{% endhint %}

{% hint style="warning" %}
If you have two or more of the plugins listed above, migrate them in the order indicated.
{% endhint %}

{% hint style="success" %}
If you are using a [Cloud version](https://www.glpi-project.org/en/pricing/), plugin migration will be automatic. Migration from GLPI 10 to GLPI 11 will be available upon request only (coming soon).
{% endhint %}

***

## Plugin migration

### Generic Objects

* **If your plugin was not up to date before the migration (version prior to 2.14.14)**, please download and activate the plugin from the marketplace. Otherwise, proceed to the section ‘Enter the following command’.

<div align="left"><figure><img src="https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2FIllQEfm6c8xD50SlqzVv%2Fimage.png?alt=media&#x26;token=a0628626-bf30-4708-8059-df000ba9041e" alt=""><figcaption><p>Generic Object plugin installed and activated</p></figcaption></figure></div>

Generic Objects plugin enabled

{% hint style="warning" %}
If you are migrating to a new instance, remember to copy the plugin files from the `/files/_plugins/genericobject` directory to the new `files/_plugins/` directory of your new instance.
{% endhint %}

By clicking on the wrench icon, you can view the items detected by the plugin that will be migrated.

<figure><img src="https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2FdhDkExyeCBkdOHjYkqgs%2Fimage.png?alt=media&#x26;token=9b7afbcf-45a4-418f-b88a-a2b511d8f59d" alt=""><figcaption><p>Steps to migrate </p></figcaption></figure>

<figure><img src="https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2F6ZaEjGgjbe3j8bbDByOj%2Fimage.png?alt=media&#x26;token=a0c27b95-608a-4fcd-813b-2f4464876297" alt=""><figcaption><p>Assets to migrate to assets definitions</p></figcaption></figure>

* Run the following command

For Ubuntu and similar systems:

```
sudo -u www-data php bin/console migration:genericobject_plugin_to_core
```

For CentOS and similar systems:

```
sudo -u apache php bin/console migration:genericobject_plugin_to_core
```

The process may take some time if you have a large amount of data to migrate.\
You should get a result similar to the following:

```php
[============================] 100%
> 2 custom assets imported successfully.
> 1 "server" object imported successfully.
> 1 "videoprojector" object imported successfully.
Migration is complete.
🛈 Display preferences and saved searches related to a `genericobject` type must be 
recreated manually.
✓ 6 items created.
```

The migrated elements will be visible from the park as well as from the Generic Objects plugins.

<figure><img src="https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2F5zoeL28HmJugHLSoD1bi%2Fimage.png?alt=media&#x26;token=61582af3-de5e-4d95-b55b-ec6adf9a85da" alt=""><figcaption><p>Post-migration verification of Generic objects</p></figcaption></figure>

***

### Fields

{% hint style="info" %}
This step is required if you use Fields with FormCreator.
{% endhint %}

{% hint style="warning" %}
If you are migrating to a new instance, remember to copy the plugin files from the `/files/_plugins/fields` directory to the new `files/_plugins/` directory of your new instance.<br>
{% endhint %}

This is not a migration per se, but you must ensure that the plugin is present and enabled.

<div align="left"><figure><img src="https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2FGA64bLxn55PuB1bKL7lO%2Fimage.png?alt=media&#x26;token=225e871d-c9aa-47be-928a-0dcd01bcb2f2" alt=""><figcaption><p>Fields plugin installed and enabled</p></figcaption></figure></div>

***

### FormCreator

* **If your plugin was not up to date before the migration (version prior to 2.13.10)**, please install and activate the FormCreator plugin. Otherwise, proceed to the section ‘Enter the following command’.

<div align="left"><figure><img src="https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2Fk0cgyR3p7OOLJsZCH92N%2Fimage.png?alt=media&#x26;token=d7c18fac-974d-40b5-8a3b-2ac4430ee196" alt=""><figcaption><p>FormCreator plugin isntalled and enabled</p></figcaption></figure></div>

* From **`Tools`** > **`Formcreator EOL Info`**, you can view the number of forms to be migrated and those natively present in GLPI (2 by default).

<figure><img src="https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2FNrNau7fkNFf33ikfY7cF%2Fview_status_migration_FC.png?alt=media&#x26;token=7b20f677-12fe-40d0-8177-c311ec26d9a4" alt=""><figcaption><p>Steps to migrate </p></figcaption></figure>

<figure><img src="https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2FTf8Rj4e81ioQZOKwOZzH%2Fstatus_migration_FC.png?alt=media&#x26;token=12678b3a-d568-47a6-8c58-8cfa3064e461" alt=""><figcaption><p>Number of forms to migrate</p></figcaption></figure>

* Then run the following command

For Ubuntu and similar systems:

```
sudo -u www-data php bin/console migration:formcreator_plugin_to_core
```

For CentOS and similar systems:

```
sudo -u apache php bin/console migration:formcreator_plugin_to_core
```

The process may take some time if you have a large amount of data to migrate.\
You should get a result similar to the following:

```php
[============================] 100%
Migration is complete.
✓ 51 items created.
✓ 21 items reused.
```

You can view the result from the migration status via **`Tools`** > **`Formcreator EOL Info`**.

***

You find a video covering this process below:

{% embed url="<https://youtu.be/2E8T7C7XTJA>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.glpi-project.org/tutorials/procedures/updating-glpi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
