Upgrade error

Over the weekend I tried to upgrade an old Moodle site from 3.3.2 to 3.6.3. I had done an upgrade the previous day that went well, so felt a little reckless, and decided to do the upgrade in one jump.

Something to note at this point – I inherited the site from someone else. The upgrade failed and I could not log into the site for love or money. I had also not turned on debugging, so the error was not very detailed.

After many attempts to fix the issue, I rolled back to 3.3 and started again. This time I decided to rather jump to 3.4 first, before upgrading to 3.5. I also wanted to switch PHP version once the site was up and running in 3.4 before jumping to 3.5

The upgrade to 3.4 went smoothly and the site started up without a problem. The upgrade to 3.5 however proved to be a bit of a problem.

I got the following error once the upgrade had completed, and could not log into the site.


Fortunately I come across this post in the Moodle forums ( https://moodle.org/mod/forum/discuss.php?d=383652 ) that helped me fix the problem. The fix in my case was to update my config file as Sylvain suggested.

Some take-ways from this weekends upgrade:

  1. Make sure you have proper backups. You may need to role back and start the upgrade again
  2. Turn debugging on before doing the upgrade
  3. If the site is using a customized theme, turn theme change in URL on. The theme may have security issues and lock you out
  4. If it’s an old site rather take a cautious approach and do two jumps.
  5. Run the cron between upgrades
  6. Do plugin updates at each stage

The above may seem a slow way of doing it. True, but doing it twice is even slower.


Leave a Reply

Your email address will not be published. Required fields are marked *