How to update Moodle?

In order to allow a simplified update of Moodle, its installation was done using Git. To update Moodle, perform the following operations, using the command line.

Log in the MoodleBox via SSH, with the usual password Moodlebox4$.

ssh moodlebox@moodlebox.home

Update to a minor version

Type the following commands in the terminal:

cd /var/www/html/
sudo -u www-data git pull

Visit then in your browser the URL http://moodlebox.home/admin and follow the update instructions, like any Moodle installation (see the documentation here:

Update to a major version

To update to the next major version of Moodle (3.4, 3.5, etc.), type the additional following commands:

sudo -u www-data git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
sudo -u www-data git fetch origin
sudo -u www-data git pull
sudo -u www-data git checkout MOODLE_34_STABLE

Then visit the URL http://moodlebox.home/admin and follow the update instructions, just like above.