Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Upgrading to Moodle 1.6.

Upgrading to Moodle 1.6

From MoodleDocs

Note: This page needs some more work. Please help to improve it! Moodle1.6


Since the changes for the upgrade from Moodle 1.5.x to Moodle 1.6 not only change the database structure, but also the database content (everything is converted to Unicode), some considerations are important before you start. If you are upgrading a really important site, it will probably be worth doing a test upgrade on a separate copy of your site first just to make sure it goes OK.

Check the system requirements

Go to Administration >> Environment (in recent versions of Moodle 1.5) and choose Moodle 1.6 ;-) You will get a report of whether your server specs meet the requirements for Moodle 1.6 and what needs to be done. Basically you need PHP 4.3.0 or later (for PHP5, version 5.1.0 or later is required), and MySQL 4.1.16 or later (4.1.12 is ok if your site is latin-only) or PostgreSQL. Native iconv support in PHP will really speed things up too (it needs to be specified during compilation) but is not required.

Update the Moodle files

Perform a normal upgrade of your Moodle installation, backing up your database first. Take care to include ALL optional modules you have in your existing installation. Conversion of the data to UTF-8 of these modules will not be possible if you forget this.

Database migration

Although not strictly necessary, it is HIGHLY recomended that you migrate your database to UTF-8 immediately after upgrading. You'll find the link to do this waiting for you at the top of the admin page.

Some third party modules will not be ready yet for Unicode migration, you'll be warned about these so you have a chance to disable them or seek a later version.

If you run your site in one language only, select this option to save a lot of time on the migration. Otherwise, Moodle will figure out how to do the migration for every piece of data based on the language of the user, course and your Moodle site.

Since the migration is a process which causes heavy processor and disk load and can take a long time to perform, you should choose the moment of the upgrade carefully. For an indication, Moodle.org had about 3 million bits of text and took 2.5 hours on a very fast dual-opteron server.

During the migration process, you'll see a progress bar which updates every now and then. Let it go all the way to 100%. If the migration is interrupted for some reason (browser closed or network failure) don't worry - just wait for a while to make sure the process is finished on the server, and then start the migration again. The process is smart enough to take up where it left off and you'll see messages about this.

The migration process places the Moodle installation in maintenance mode, so non-admins cannot login. Once you start the migration it needs to finish all the way before the installation can be used by others.

Languages

An entirely new interface for languages has been designed. By default, Moodle only contains one language (English), and you need to install all the language packs you need individually. The new interface makes this easy - it will download them for you from moodle.org and install them in your data directory.

After the migration of the database, you may go to Administration >> Configuration >> Language and follow the Language import utility link. You may select the desired language packs on the right pane and install them directly. Updating the language packs can now easily be done by following the update link.

Take care to use always a language pack that matches your database content:

  • Upgraded installations: first database migration, then UTF-8 language packs
  • New 1.6 installations: you will immediately use UTF-8 language packs

You will not find the en_utf8 language pack in your moodledata/lang folder. It is in the moodle/lang folder and is not to be modified at all. It should never be upgraded, since it is part of the installation. All other language packs, even modifications for the en language pack go in the moodledata/lang folder (and are in the case of the en language pack called en_utf8_local or en_xx_utf8 but then with parent language string in moodle.php)

If you use the langlist variable on the config variables page, don't forget to change the language names from xx to xx_utf8 or the languages will not be shown in the language drop down menu.

Localisations of existing language packs

Localisations of an existing xx_utf8 language pack should be called xx_utf8_local, should be UTF-8 encoded and should also be put in the moodledata/lang folder. It is still possible to give it another name like xx_mypack_utf8, but then you should add the parentlanguage string in moodle.php from your localisation.

Custom language packs

Custom made new language packs go in moodledata/lang. They have to be in a xx_utf8 folder and MUST be UTF-8 encoded (Unicode). We no longer support other encodings, especially when mixed with UTF-8 packs.


If you are using custom language packs before the UTF-8 migration, please remember that they need to include either 1) thischarset or 2) parentlanguage in their moodle.php. Please also rename them from xx to xx_utf8 after the migration. You might need to convert the custom packs into UTF-8 format before using them in a migrated Moodle 1.6.

Advanced languages

If you want to download all the languages at once, we suggest checking the whole lang directory out directly from CVS into your moodledata/lang directory.

 cvs -z3 -d:ext:myusername@moodle.cvs.sourceforge.net:/cvsroot/moodle co lang

This is the recommended method for translators, as you can edit these packs within Moodle and just check them straight back into CVS.

Finishing up

Congratulations! After migrating your database and updating your languages you should have a functional 1.6 site. You'll probably want to visit the various admin pages (especially Variables) to turn some of the features on and off.

See also

  • Translation - More details on language packs in 1.6, especially customized packs
  • Converting files to UTF-8 - General text on how to convert files, like non-standard language packs, to UTF-8

Using Moodle forum discussions: