googlemoodle

Upgrade Moodle

It is strongly recommended that you create a backup before starting the update process. If you have important data, it is advisable that you create and try to restore a backup to ensure that everything works properly.

Upgrade Moodle following these steps:

  • Move your current Moodle files:

    $ sudo mv /opt/bitnami/apps/moodle/htdocs/ /opt/bitnami/apps/moodle/htdocs.backup
    
  • Download the new Moodle version. An example is shown below (the XX placeholder in the command refers to the Moodle version number).

    $ wget http://download.moodle.org/download.php/direct/stableXX/moodle-latest-XX.tgz
    
  • Create a new folder and uncompress the files:

    $ sudo mkdir /opt/bitnami/apps/moodle/htdocs/
    $ sudo tar -xzvf moodle-latest-XX.tgz -C /opt/bitnami/apps/moodle/htdocs/ --strip 1
    
  • Copy your previous configuration file and your modules or themes:

    $ sudo cp -a /opt/bitnami/apps/moodle/htdocs.backup/config.php /opt/bitnami/apps/moodle/htdocs/
    $ sudo cp -a /opt/bitnami/apps/moodle/htdocs.backup/theme/MY_THEME /opt/bitnami/apps/moodle/htdocs/theme/
    $ sudo cp -a /opt/bitnami/apps/moodle/htdocs.backup/mod/MY_MOD /opt/bitnami/apps/moodle/htdocs/mod/
    

NOTE: Replace the MY_THEME and MY_MOD placeholders with the directory or path names for your downloaded and installed themes and modules (these are different from the ones shipped by Bitnami).

  • Configure file permissions as follows:

    $ sudo chown bitnami:daemon -R /opt/bitnami/apps/moodle/htdocs/
    $ sudo find /opt/bitnami/apps/moodle/htdocs/ -type f -exec chmod 664 {} \;
    $ sudo find /opt/bitnami/apps/moodle/htdocs/ -type d -exec chmod 775 {} \;
    
  • Navigate to the application from a browser and follow the steps to upgrade the database to the latest version.

    NOTE: If you want to install modules or plugins from the Moodle administration panel, refer to the migration steps.