Upgrading Moodle from 4.0.5 to 4.0.8

Upgrading Moodle from 4.0.5 to 4.0.8

by Steve K. -
Number of replies: 9
Dear all,

I want to upgrade Moodle 4.0.5 to  4.0.8, but after reading the official Upgrade documentation, there is no explanation if we use third-party plugins and themes.

I have installed Lambda Theme (purchased from third-party) and some plugins downloaded from Moodle plugin directory. How can I upgrade Moodle to 4.0.8 without loosing all data, plugins and the theme I've installed?

Thanks in advance.

Best regards,
Steve
Average of ratings: -
In reply to Steve K.

Re: Upgrading Moodle from 4.0.5 to 4.0.8

by Ken Task -
Picture of Particularly helpful Moodlers
Would assume that since you are only updating to a point release .5 to .8 that the plugins you have would be compat - at least those you installed from Moodle plugins site.  

Your theme, as you know, is from a 3rd party and thus best to check with the maker of the theme.

Moodle doc:

Good practice to do a site backup just prior to any update or upgrade ... that's an archive of code directory, a corresponding DB dump to an sql file, and minimal moodledata/filedir/

Question ... that's not much of an update .5 to .8 and it's 4.0.x ... why not upgrade to 4.1 as it is long term support version?

'SoS', Ken

In reply to Steve K.

Re: Upgrading Moodle from 4.0.5 to 4.0.8

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

Broadly the steps are:

  1. Move all files and folders from the Moodle source code folder (the site's home directory) into a backup folder.
  2. Download and extract the newer Moodle version's files into the source code folder.
  3. Copy config.php from the backup folder into the source code folder along with any additional plugins and themes.
  4. Log into your site as an admin to start the upgrade.

Performing a database backup first is a sensible precaution as Ken suggests.

After performing the Moodle upgrade it would be good to check if any third party plugins or themes need updating too.

In reply to Steve K.

Re: Upgrading Moodle from 4.0.5 to 4.0.8

by Steve K. -
Dear Ken and Leon,

Thank you for your reply.

I decide to upgrade to Moodle 4.1.3. All plugins and the theme are compatible with Moodle 4.1.3.

Before proceeding with the upgrade, first I will do a backup of the database and all old Moodle files (expect config.php) will move to new backup folder.

By default, in the Moodle file directory, there is a "themes" folder where I will paste the third-party theme files. However, what about the custom installed plugins? Do I need to download all the files and put them in the default folder (if yes then which folder), or will I need to do that during the upgrade process?

See the screenshot of all custom installed plugins right now: https://ibb.co/bgSJn4v

Best regards,
Steve
In reply to Steve K.

Re: Upgrading Moodle from 4.0.5 to 4.0.8

by Ken Task -
Picture of Particularly helpful Moodlers
First things first ... Admin -> Server -> Environment check.  Update the component.   See if your server meets requirements for 4.1.

For each one of the additional plugins, look them up in

https://moodle.org/plugins/

to see if there is a version for your destination version (4.1).

One of those, Custom Certificate, has dependencies - other plugins related.
So it appears you only have 4 + the commercial Lambda theme which you have
to check with maker of.

When you copy the config.php file also copy the addon plugins already installed ... a block is in the blocks directory, a mod is in the mod directory, a report is in the report directory ...

You upgrade core first, and the first run of notifications or right after
upgrade it will have a link that points you to additional plugins in need of upgrading.   If you see 'missing from disk' you forgot to copy that directory from old into new ... do that at that point before moving forward ... refresh screen ... until there are no more 'missing from disk' notices.

Just one piece of advice on upgrading multiple addons ... you dnn't have to do all of them at once.   You can upgrade them one at a time and moodle will loop you back to the screen to acquire the upgrades of the others.  

Why do it that way? Less processing ... won't hit a time out limits or processing limits related to memory, etc.

Old saying ... 'slow and steady wins the race' ... applies, IMHO!

'SoS', Ken

Average of ratings: Useful (1)
In reply to Steve K.

Re: Upgrading Moodle from 4.0.5 to 4.0.8

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

This is the full list of plugin types and their corresponding folders. As you'll see this lists themes as going in the /themes folder, and the other folders Ken listed.

Some plugins can also have sub-plugins, such as Custom Certificate's customcertelement_??? items. These normally come with the plugin. Unless you know that you also have additional sub-plugins then you don't have to worry about these, just get the main plugin and they should all be present.

Average of ratings: Useful (1)
In reply to Steve K.

Re: Upgrading Moodle from 4.0.5 to 4.0.8

by Steve K. -
I contacted the theme developers and they confirmed that their theme (Lambda) is compatible with Moodle 4.1.x.

Now, I successfully upgraded to 4.0.8 without any issue... So, next I will proceed with upgrading to 4.1.3 and I hope that everything will go smoothly without any issue.
In reply to Steve K.

Re: Upgrading Moodle from 4.0.5 to 4.0.8

by Steve K. -
Here we go...

I don't have luck this time, at all.

There is an issue with tiny_autosave

Here is screenshot: https://ibb.co/Rc95tHy

I have no idea whether to continue with upgrading or....
In reply to Steve K.

Re: Upgrading Moodle from 4.0.5 to 4.0.8

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

That error suggests there has been a previous attempt to upgrade to Moodle 4.1 that did not complete successfully. The error is reporting that a database table that is to be added as part of the upgrade to Moodle 4.1 is already present.

You could try deleting that table – mdlnk_tiny_autosave – and see if the upgrade completes successfully. Make sure you have taken a backup of the database before making changes such as this.

If that doesn't work you may need to delete then recreate then restore your Moodle database.

In reply to Leon Stringer

Re: Upgrading Moodle from 4.0.5 to 4.0.8

by Steve K. -
Yes Leon, I delete that table and upgrade process was successful!

Now everything works fine, without any issues.

Thank you so much to all of you for the support.

Best regards,
Steve