Unofficial but simple way to upgrade Moodle
In the last days I have been involved in setting up a Moodle website. Moodle is a very complex software that wights 140+ MB, about 14000+ files. Installing it is difficoult, Upgrading it is a pain. Why?
Compared to other php applications, like WordPress, Moodle is not so automatized. Installing it means to creating a folder outside the http root of your server, creating a database and setting up a cron job. WordPress does not need this and its installation (and backup) (and upgrade) is totally automatic!
Recently I also received an attack on my moodle server that caused me some big trouble; all hostings were turning off my account asking me to repair it.
Upgrading Moodle: how I do it
I am using a private italian hosting, and I am not able to access the server via ssh so I have to upgrade via ftp.
First, unnamed step:
- did you backup? (I pay the hosting for a weekly backup, for now this is good!)
then, my checklist:
- upload latest moodle.zip.
- maintenance mode.
- access via ftp with Filezilla.
- create a new folder called "moodle_old".
- copy all content of http root into moodle_old.
- uncompress latest moodle.zip. You get a /moodle directory.
- move the content of /moodle in the http root.
- move config.php and custom plugins from /moodle_old to the http root.
- reach out your website with a browser and do the DB upgrade, upgrade plugins, etc etc (from this point you can follow instructions in browser).
Et voilĂ ! Moodle is updated. 9 steps is still a lot tough. There are many steps that you can do wrong and loose all your files. I wonder Moodle was easier to upgrade, but the truth is that it's one of the most cusotmized software in the planet - what if an automatic upgrade deletes a university customization?
You get the point. Happy upgrading.