UPGRADING $Id$ --------- As Moodle grows, there are changes to the code and sometimes changes to the database structures. Moodle is able to upgrade its own databases, using information in files called version.php. There is one of these for the main tables (in this directory) and one for each module. In the following instructions I will include some sample Unix shell commands - there are obviously graphical ways to do the same things. Before the upgrade ------------------ Before upgrading any version of Moodle, I recommend making a backup copy of the moodle directory, your data directory and your database, to guard against the very unlikely event that something in the upgrade goes wrong. At the very least, make a copy of your config.php file and any languages, custom themes or plug-ins you have added to Moodle. Upgrading the files using CVS -------------------------------- If you are using CVS, just go to the Moodle root directory and update the files: cvs update -d If you have been editing Moodle files watch the messages very closely for possible conflicts (and consider sending your fixes in to me as patches :) Upgrading the files using a downloaded archive ------------------------------------------------- Rename the current installation directory (as backup) mv moodle moodle.backup and then unpack the new tar or zip file into the old location. (Overwriting an old installation usually works fine, but I can't guarantee that it always will). tar xvzf moodle-1.0.5.tgz Next, copy the config.php file from your old installation into the new installation (or make a new one by editing config-dist.php). If you have created new themes or other plug-ins then make sure you copy those back too. cp moodle.backup/config.php moodle cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme Finishing the upgrade --------------------- Visit the admin page of your installation to complete the upgrade (eg http://example.com/moodle/admin). It doesn't matter if you are logged in as admin or not. Moodle will automatically detect the new version and perform any database or filesystem upgrades that might be necessary. If all goes well (no error messages) then you can just go on using the new version! If you have problems with this procedure, let me know. Cheers, and have fun! Martin