Dumb down upgrade process for me

Dumb down upgrade process for me

by Frank Madison -
Number of replies: 4

About to upgrade from 3.11 to 3.11.4. I read the doc, but just to verify, is this basically the process when running with ISS?

  1. Download latest files and extract to a temporary folder.
  2. Locate existing moodle folder in inetpub\wwwroot and rename to something else
  3. Copy moodle folder from temporary folder to inetpub\wwwroot
  4. Copy config.php from backupfolder to moodle
  5. Reboot server.
  6. Launch Moodle
  7. Click through prompts at default settings to confirm upgrade, upgrade database and upgrade/copy over existing plugins.
Average of ratings: -
In reply to Frank Madison

Re: Dumb down upgrade process for me

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

If you're not certain of the process, make a copy of your site or server, and test out the steps. That way you are finding out any problems or gaps in your knowledge on a test site, not the production site.

Between steps 1 and 2 take a database backup. A minor "point" release upgrade (such as from 3.11 to 3.11.4) is unlikely to have problems requiring rolling back to the previous version, but it's a safety net for you. And it costs nothing and takes minutes.

Between steps 4 and 5, if you have any additional plugins or themes then copy their folders from backupfolder into moodle. Optionally/ideally replace these plugins with any available updates for your Moodle version.

Step 5. Reboot server. This shouldn't be needed.

Instead of steps 6. and 7. consider doing this at the command line, for example:

cd c:\inetpub\wwwroot
php admin\cli\upgrade.php

assuming the correct version of php.exe is on your path. With major version upgrades (such as from 3.11 to 4.0) using the command line is recommended because it's not subject to timeouts, unlike upgrading via the the web interface. If an upgrade took two minutes and the web site was configured to timeout scripts after one minute then the upgrade could only be partially complete.

If you used Git to manage the Moodle source code folder then a minor version upgrade essentially becomes two steps: git pull to get the updated source code, and php admin\cli\upgrade.php to perform the upgrade.

In reply to Leon Stringer

Re: Dumb down upgrade process for me

by Frank Madison -
Thank you for this info.

Forgot to add this in 1st post of environment:

AWS hosted server

Moodle 3.11
IIS, win 10
Maria D.B 10.4.20
php 7.4.13


these are the folders:

C:\inetpub\wwwroot\moodle\admin
C:\Program Files (x86)\PHP\v7.4

What would be the correct cli syntax to upgrade with these paths?

For future reference for when we try to a major version upgrade. After doing step 5, we should try to use the cli commands to perform the upgrade.
In reply to Frank Madison

Re: Dumb down upgrade process for me

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
As well as taking a database backup you should be taking a backup of your moodledata directory... In fact you really should be backing up your Moodle code directory (inetpub/wwwroot), your database and your moodledata directory on a daily basis as you will need all three of these; from the same point in time, to perform a successful rebuild of your Moodle install. Site_backup

Jon
In reply to Frank Madison

Re: Dumb down upgrade process for me

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

The syntax is probably:

cd C:\inetpub\wwwroot\moodle
"C:\Program Files (x86)\PHP\v7.4\php" admin\cli\upgrade.php

The first command is to change to your Moodle source code folder, the second command uses the full path to php.exe just in case this isn't on the path.