Updrading Moodle™ Version on MClusters Platform
This article guides you on how to upgrade Moodle both between major versions and between minor versions on the MClusters Platform.
1. Upgrade between major versions
This applies to upgrades between major versions, such as from v3.9 to v3.10.
1.1 Access the CLI Console
Log in to the Client Panel and locate your target deployment on the Home page or the My Applications page.
Click the "Manage" button on the Home page or the My Applications page. Then Click the "Shell / SSH" tab in the menu bar.
On the Shell / SSH page, click the "Connect" button to initiate a shell session. You can issue commands in it.
Note: For security reasons, the function is only open to the account holders who have passed our verification process. If you would like to enable it, please update your billing information.
1.2 Execute the upgrade script
Execute the command line to upgrade your Moodle.
cd moodle gosu www-data php html/admin/cli/upgrade.php
2. Upgrade between minor versions
This applies to upgrades between minor versions, such as from v3.10.1 to v3.10.2.
2.1 Get the Latest Updates
Check updates on Moodle admin portal.
Right click on the Download button, followed by clicking Copy link address. The copied link is similar to https://download.moodle.org/download.php/direct/stable310/moodle-3.10.4.zip.
2.2 Upgrade via CLI console
Access the CLI console (refer to step 1.1)
Download the latest updates from the copied link that you get in step 2.1 by issuing the command below.
cd moodle wget https://download.moodle.org/download.php/direct/stable310/moodle-3.10.4.zip
Note: If "wget" is not recognized, please install it via command
apt update && apt install -y wget.
Extract the downloaded file. In this case, it’s moodle-3.10.4.zip.
Note: If "unzip" is not recognized, please install it via command
apt update && apt install -y unzip.
Get database connections on current moodle instance
Replace existing website files
mv html html_old mv moodle html cp -pr html_old/theme/mytheme html/theme/mytheme cp -pr html_old/mod/mymod html/mod/mymod rm -rf /cloudclusters/moodle/moodledata/cache
Change files permissions
chown -R www-data:www-data html/
2.3 Continue the Upgrade Process on Moodle Admin Portal
- Access Moodle admin portal, and follow the prompts to complete the upgrade.
Note: If the https page displays abnormally after upgrading, try adding/updating the following configurations in file html/config.php.
$CFG->sslproxy = true; $CFG->wwwroot = 'https://www.yourdomain.com';