Location : Web Hosting - Web Hosting Knowledge Base - Moodle CMS Tutorial

Manual upgrade moodle

Upgrading moodle is a simple process, you should first check through the release notes of the latest moodle version that you are planning to upgrade to, be sure your server is meeting the requirements stated in the release notes. If there is no compatibility issues with your servers and the moodle version, you can proceed on to the upgrade process, otherwise you may want to consult your web hosting provider to seek help on getting the server side compatibility issues resolved before proceeding on.

Backup moodle website and MySQL database

Before starting any upgrade process, backup your moodle website and backup mysql database as well, this is important as it enable you to have a quick rollback option should anything fail in the upgrade process causing your moodle website to malfunction.

If you are familiar with Linux shell commands, you can follow this quick steps :-

SSH login to your hosting account and goto the root folder of your moodle website.

Enter following command :-

cp -a moodle_site backup_moodle_site

where 'moodle_site' is your working moodle website folder name, and the 'backup_moodle_site' is a new folder that will be identical to your working 'moodle_site' after the copy process. This is a quick way to create a backup of a folder.

Enter the following command to dump out your moodle mysql database into a text file, this is your moodle database backup, it contains database schema and data in ascii text format.

mysqldump --database mysql_dbname > dumpfile.sql

Prepare new moodle files

Domain latest moodle (download.moodle.org) and extract the files in your hosting account, you can use an FTP client to do this or you can do it directly from the hosting account shell prompt if you are familiar with Linux shell commands :-

SSH to your hosting account and goto root folder of your moodle website and enter the following commands :-

mv moodle_site backup_moodle_site (rename the current moodle folder)

wget path_to_latest_moodle_tarball

tar -xvzf latest_moodle_tar.gz

mv extracted_moodle_folder moodle_site (rename the newly extracted moodle folder to the working moodle folder name)

cp backup_moodle_site/config.php moodle_site/config.php

cp -pr backup_moodle/site/theme/mytheme moodle_site/theme/mytheme (copy back your own moodle theme)

Running the moodle upgrade program

After getting the moodle files ready, enter the moodle admin path in your web browser to trigger the upgrade process :-


Moodle will automatically detect there is a newer version and start the necessary upgrade process, read through the status messages carefully to ensure everything is completed properly and if there is anything requiring your attention.

Double check your moodle website

After the upgrade process completed, double check your newly upgraded moodle website to ensure everything is working as expected.