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: Difference between revisions

From MoodleDocs
(→‎Languages: what to do with langlist after upgrade)
No edit summary
Line 1: Line 1:
''Note: This page needs some more work.''
''Note: This page needs some more work. Please help to improve it!''
{{Moodle 1.6}}
{{Moodle 1.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, some considerations are important before you start.
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==
==Check the system requirements==
Go to Administration >> [[Environment]] and choose Moodle 1.6 ;-)  
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.
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 (though we advise avoiding PHP 5.0.x), 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==
==Update the Moodle files==
Line 12: Line 12:


==Database migration==
==Database migration==
Although not strictly necessary, it is highly recomended that you migrate your database to UTF-8 immediately after upgrading. Check if your site works properly (e.g. no missing optional modules) first.
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.
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. It might be good practice to do that on a test installation first if you have one.


The migration process places the Moodle installation in [[Maintenance mode|maintenance mode]], so non-admins cannot login. In order to avoid having to restart the migration process, it is recommended that the value of max_execution_time in the php.ini file be set to 0 so that the process does not timeout. After the migration is completed, the execution time can be set back to your preferred setting. The migration process saves its current state frequently during its execution, so should it need to be restarted, it will begin near to where it finished. However, once started it needs to finish before the installation can be used by others.
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|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==
==Languages==
An entirely new interface for languages has been designed. 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.
So you can let Moodle 1.6 download and install the language packs for you.


Custom made new language packs go in moodledata/lang. They have to be in a xx_utf8 folder and should be utf8 encoded.
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.
 
Custom made new language packs go in moodledata/lang. They have to be in a xx_utf8 folder and MUST be UTF8 encoded (Unicode).  We no longer support other encodings, especially when mixed with UTF8 packs.


Localisations of an existing xx_utf8 language pack should be called xx_utf8_local, should be utf8 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.  
Localisations of an existing xx_utf8 language pack should be called xx_utf8_local, should be utf8 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.  


Take care to use always a language pack that matches your database content:
Take care to use always a language pack that matches your database content:
  * Upgraded installations: first database migration, then utf8 langpacks
  * Upgraded installations: first database migration, then utf8 langpacks
  * New 1.6 installations: immediately use utf8 langpacks
  * New 1.6 installations: you will immediately use utf8 langpacks


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 parentlanguage string in moodle.php)
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 parentlanguage 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.
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.
==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==
==See also==

Revision as of 03:52, 20 June 2006

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 (though we advise avoiding PHP 5.0.x), 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, taking special care when backing up the database. 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.

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

Localisations of an existing xx_utf8 language pack should be called xx_utf8_local, should be utf8 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.

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

* Upgraded installations: first database migration, then utf8 langpacks
* New 1.6 installations: you will immediately use utf8 langpacks

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 parentlanguage 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.

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

Using Moodle forum discussions: