Need help in upgrading Moodle 3.8 to 3.11+

Need help in upgrading Moodle 3.8 to 3.11+

by Sarath P -
Number of replies: 6

Hello everyone,

I have a doubt regarding the Moodle upgrade. My current Moodle version is 3.8.2 (Build: 20200309).

PHP Version 7.2.24-0 ubuntu0.18.04.7

I want to upgrade to Moodle 3.11+. When I checked the Moodle docs, I could see that Moodle 3.11 requires Ubuntu 20.04 server with PHP 7.4

My question is can we upgrade Moodle 3.8.2 to 3.11+ directly without changing the Server or PHP?

Or do I have to get a new server with Ubuntu 20.04 and PHP 7.4 and then upgrade Moodle 3.8.2 from that server?


If someone could provide some steps for a clean upgrade, that would be great.

Thanks in Advance

Average of ratings: -
In reply to Sarath P

Re: Need help in upgrading Moodle 3.8 to 3.11+

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
https://docs.moodle.org/dev/Moodle_3.11_release_notes#Server_requirements

Minimum PHP version is 7.3. So, no, you need to upgrade PHP first. 3.8 works fine with PHP 7.4 so it could be worse.
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Need help in upgrading Moodle 3.8 to 3.11+

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

You need to upgrade MariaDB too, Moodle 3.11 requires MariaDB 10.2.29 or later.

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Need help in upgrading Moodle 3.8 to 3.11+

by Sarath P -
Thank you Howard and Leon for your response.

I believe Ubuntu 18.04 LTS doesn't provide PHP 7.4. To install PHP 7.4 I think it has to be done through PPA, correct? I think upgrading the server to 20.04 LTS is less hassle compared to manually installing the PHP through PPA.
Below are the steps I am planning to execute on the production server. 

Steps:
1. Take the moodle, moodledata, and DB backup.
2. Upgrade the current server from Ubuntu 18.04 LTS to Ubuntu 20.04 LTS.
3. Run and Install Apache/MySQL/PHP and additional software scripts as mentioned in Moodle 311 installation docs.
4. Finally Upgrade the moodle 3.8.2 to 3.11+

Are the above steps correct for a clean upgrade?
In reply to Sarath P

Re: Need help in upgrading Moodle 3.8 to 3.11+

by Ken Task -
Picture of Particularly helpful Moodlers

My 2 cents ...

Have never regretted the time it takes to run backups .. full site *and* full user course backups.   Automated one run to a designated directory outside of moodledata - mounted data device preferred.

When it comes to moodledata only filedir and lang are needed me thinks.  The other directories will be rebuilt once site migrated to new server.

Also, if, where you host, they offer attached/removalable/re-mountable data devices, get one of those large enough to handle site backups and course backups.

Before pulling trigger on in place upgrade, detach the mounted data device and after the upgrade in place has take place, re-attach to restore your moodle.

Don't use Ubuntu, but a question .... if one does an upgrade in place doesn't that include an upgrade to Apache/PHP/and MySQL?

If it does, don't forget to run MySQL's upgrade command.

'SoS', Ken


In reply to Ken Task

Re: Need help in upgrading Moodle 3.8 to 3.11+

by Sarath P -
Hi Ken,
Thank you for your response.

In my case, the moodle, moodledata and DB resides in a single instance. In the future, I'll definitely get one of those re-mountable data devices.
If not Ubuntu, which one would you prefer?
I did a test run. I upgraded the server from 18.04 to 20.04. It also upgraded the Apache/PHP and MySQL along with the Server upgrade. After a successful server upgrade, I went for Moodle upgrade, however, I faced some driver issues which resolved by re-executing the script in Install Additional Software. Now my moodle is up and running (version 3.10.4+)
In reply to Sarath P

Re: Need help in upgrading Moodle 3.8 to 3.11+

by Ken Task -
Picture of Particularly helpful Moodlers

One cannot argue against success! smile   That to say, Ubuntu is a good choice ... considering LTS distros, upgrade of OS in place, upgrade of daemons during that upgrade, special releases for VM's (Azure, Google, other) - it's updated often (kept secure - most linux OS's are).

As long as requirements for Moodle keep pace with AMP stack, good to go.

Now all you need to work on is using git for Moodle! smile

'SoS', Ken