Moodle Installation Guide for Ubuntu Linux (2)

Vijay Yongjoon Park
4 min readJan 17, 2018

--

by Yongjoon Park, S2HSP/GIZ Nepal

PART 2. UPGRADE OF MOODLE TO HIGHER VERSION

Here we will upgrade the old Moodle version (3.3) to the latest Moodle (3.4). Please refer to the official documentation for more information.

Shown below is the Moodle (3.3) site created for this guide.

Step 1. Back Up Data

  • Before you begin upgrading your current Moodle, you must back up important files in a case where upgrade or migration go wrong.

1. Moodle software

  • For example, Moodle (3.3) folder in the web server (/var/www/html/moodle)
  • Especially, config.php file in Moodle.

2. Moodle uploaded files (/var/moodledata)

  • Please copy these folders to some other location. (e.g. Documents)

Step 2. Back Up Database

  • Create a backup file of the current MySQL database.
  • You can create MySQL dump by command lines. However, a web-based tool such as Webmin may make things easy for you.
  • Webmin is a program that simplifies the process of managing a Linux or Unix system. Webmin lets you perform these tasks through an easy to use web interface, and automatically updates all of the required configuration files for you. This makes the job of administering your system much easier.
  • Download and install Webmin from its website.
  • Use your Ubuntu user account and password to be connected.
  • Go to ‘Servers’ on the side bar, and then ‘MySQL Database Server’.
  • You will see your MySQL databases. Select ‘moodle’ that you are using for Moodle.
  • Click ‘Backup Database’.
  • Before backing up the database to a file, first you should create a SQL file.
  • Make sure this SQL file is writable.
  • Select the created SQL file in ‘Path on server’, and click ‘Backup Now’.
  • Now, you have the SQL file with the ‘moodle’ database.

Step 3. Prepare New Version of Moodle

  • Download the official update of Moodle (3.4 as of Jan. 2018) from its website.
  • Extract Moodle in a preferred location. Here we put it in Documents folder.
  • Move the new Moodle in the default root folder of Apache. (/var/www/html/)
  • Do NOT copy new files over the old files!
  • Copy your old config.php file (3.3) back to the new Moodle (3.4) directory.

Step 4. Upgrade Moodle

  • Go to Moodle site (http://[IP.ADDRESS.OF.SERVER]/moodle). It will be redirected to the upgrade processes.
  • Moodle will automatically detect the new version and perform all the SQL database or file system upgrades that are necessary. If there is anything it can’t do itself (very rare) then you will see messages telling you what you need to do.
  • Assuming all goes well (no error messages) then you can start using your new version of Moodle and enjoy the new features!
  • You can check the version of your Moodle from ‘Site administration > Server > Environment’. The other way is to look it up in version.php file located in your Moodle folder.
  • In fact, you would notice that the colour of the site name ‘food’ has been changed in this practice.

--

--