Upgrading Moodle 3.8 to 4.3 (feat. PHP 7.4 to 8.1, and dealing with problem plugins)

Описание к видео Upgrading Moodle 3.8 to 4.3 (feat. PHP 7.4 to 8.1, and dealing with problem plugins)

Lots of stuff in this video. I upgrade a Moodle from 3.8 to 4.3 using git. Along the way a PHP version upgrade was also necessary, so I go through upgrading PHP from the Sury repository (No total OS upgrade necessary - though it is also a good option.

This time, I'm working with a booby trapped Moodle. i encounter numerous problems along the way and go through how to fix them. One problem very surprisingly sorts itself out...


0:40 - Initial Moodle setup
1:40 - Checking Environment variables
2:40 - Checking PHP and Moodle versions
3:25 - About PHP end-of-life versions
4:13 - Other things to consider (my additional plugins)
6:00 - Planning the next move
7:05 - Logging in and changing to the Moodle directory
7:15 - Making sure we're fully updated on the current branch (3.8.x)
8:25 - Putting the Moodle into maintenance mode
9:45 - Reminder to Take backups - don't try this at home (or anywhere else) without backups!
10:21 - Checking that all my plugins are also up-to-date
10:57 - Checking for updates on the Notifications page

11:29 - 1st upgrade 3.8.9 ▶ 3.11.18 (on PHP7.4)
13:27 - Checking for the updates on 3.11
13:45 - Checking for plugin updates for the new Moodle version (3.11)
15:10 - A note on updating sites with many plugins installed
15:33 - Planning the next upgrade step (to 4.0 - Checking the environment again)

16:31 - 2nd upgrade 3.11.18 ▶ 4.0.12 (still on PHP7.4)
18:37 - Checking for plugin updates for the new Moodle version (4.0)
19:28 - After updating plugins, the default settings screen (with a required setting)

20:44 - 3rd upgrade 4.0.12 ▶ 4.1.8 (still on PHP7.4) (I sing the praises of git yet again here)
21:42 - Checking the environment again for 4.1
21:53 - Checking the environment again for 4.2 (and one more reason why git is awesome)
22:40 - Realizing I can't move to Moodle 4.2 without first upgrading PHP
22:55 - Googling how to upgrade PHP (and what steps we need to do)

25:40 - Upgrading PHP - Step 1: Adding the Sury repository
26:55 - Upgrading PHP - Step 2: Update package info (apt update) to get info from the newly added Sury repo
27:38 - Upgrading PHP - Step 3: Installing a new PHP version (PHP8.1)
29:16 - Upgrading PHP - Step 4: Setting Nginx to use php8.1-fpm instead of php7.4-fpm
32:08 - Upgrading PHP - Step 5: Changing the CLI PHP default version

33:50 - Checking for plugin updates for the new Moodle version (4.1)
34:19 - Hitting the max_input_vars problem (fpm edition)
34:45 - Finding the php.ini files (apache2, cli,fpm, etc.)
35:40 - Fixing the max_input_vars problem (php-fpm). And some other tweaks.
39:30 - Stopping the now unused php7.4-fpm service (masking not uninstalling)

40:35 - Planning the next upgrade step (tp 4.3 - Checking the environment/plugins again)
41:25 - Attempted 4th upgrade 4.1.8 ▶ 4.3.2 (on PHP8.1) (I sing the praises of git yet again here)
42:02 - OMG a plugin got borked... (featuring debugging messages that weren't actually part of the video plan)
42:30 - Using git to go back to 4.1 after a failed upgrade to 4.3 (Did I mention that git is awesome?)
46:10 - Uninstalling the problematic plugin (yeah this was also bumpier than I expected... #EditingIsTooMuchWork)
46:55 - Removing the plugin by hand (using force!)
48:35 - That plugin really wants to stay...
49:30 - Cool command: uninstall_plugins.php (I'm hoping to do a video on this script sometime soon)
52:15 - Finish arguing with topcoll and try upgrading to 4.3 again

52:25 - Hitting the max_input_vars problem (cli edition)
52:43 - Fixing the max_input_vars problem (php-cli)

55:11 - 4th upgrade 4.1.8 ▶ 4.3.2 (on PHP8.1) Success!
55:50 - Just a quick note about the Cron message on the Notifications page
56:30 - Checking on plugins and having an unexpected success
57:51 - Purging caches after a lot of upgrades... Preventing the "clash of the caches"

Some commands used
Install a new PHP version for Moodle
sudo apt install php8.1-{pgsql,mysql,curl,xml,xmlrpc,intl,soap,gd,mbstring,yaml,zip,fpm}

Switch CLI version to use newly installed PHP
sudo update-alternatives --set php /usr/bin/php8.1

Links to resources viewed at the beginning of the video
https://moodle.org/plugins/format_top...
https://moodledev.io/general/developm...
https://howtoforge.com/how-to-install...
https://www.php.net/supported-version...

Комментарии

Информация по комментариям в разработке