I just decided to upgrade Moodle since one of my action items was “Remove the Percentage Column for Outcomes in the gradebook.”  Luckily I sat on this task long enough and lo and behold, the Moodle community did this for me (note to self, try to be more proactive and put things in Moodle Tracker).

So at any rate, I decided to upgrade Moodle.  Here are the steps I have outlined for doing an upgrade such as this:

  1. Read the directions on the Moodle Documentation site. These are most useful.  http://docs.moodle.org/en/Upgrading.  Keep in mind that there may be directions specific for your installation or the version that you’re upgrading too.  Which brings me to an excellent point, don’t just follow directions you find on the internet blindly, INVESTIGATE!
  2. Create a back up of the MySQL database. Also outlined in the upgrading documentation, but putting it in for good measure.  I just ran the following command:

    mysqldump -u username -p -C -Q -e -a moodle > moodle-backup.sql

    Again this command is outlined in the upgrading Moodle documentation, but since these are my notes…I’m putting it here

  3. Create a list of the plugins you have installed. If you’re a good systems administrator, you should have all of this somewhere or other…right?  Well some of us don’t.  But you’re going to need this list to make sure that everything you’ve installed gets moved over after you unpacked the new Moodle you’re about to download and install.  Here at Wheaton, I’ve put it on an in house wiki.
  4. Move the moodle directory. The directions recommend moving and zipping up the directory.  I personally just move it and then if anything goes wrong I can move it back.  Once everything is said and done I’ll zip it up (and include the mysqldump in that zip file) and store it in the event that something goes wrong farther down the line.  To move the moodle directory:

    cd /your/web/directory/
    mv moodle moodle-bak

  5. Download the Moodle zip file and unpack it in your web directory. The next thing you’ll want to do is download the latest version of Moodle.  Once you’ve done that move it to your web directory and unpack it.  This should create a Moodle directory.
  6. Move your config.php file from the moodle-bak directory into the moodle directory. This will essentially transfer your database, server, etc. information over to the new Moodle directory.  You’ll want to go to your Moodle homepage to check out that things went smoothly with this.  You’ll see a button asking you to update, but don’t update your Moodle at this point (you’re still not done).
  7. Copy all of your plugins and themes from the moodle-bak directory to the moodle directory. Make sure that when you do this that the correct permissions get moved over.  One way to do this is by using the -p flag.  This will ensure that the directory is copied over as well as the permissions:

    cp -pR /path/to/your/plugins /path/to/new/location

  8. Visit the admin page for your Moodle and run the update. Your admin page is located at: http://server/moodle/admin.  When you get there you’ll click on a button and the script will update the database; it basically runs itself.  If there is any intervention you need to do, Moodle will let you know.
  9. Zip up the old Moodle database and file system. I like to keep these things lying around just in case.  You never know when you’ll want an old version of moodle to play with.

Now that you’ve upgraded you should be a happy camper and get all of the cool new fun features that Moodle has to offer.