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

Upgrading to Moodle 2.0: Difference between revisions

From MoodleDocs
m (→‎After upgrade: change in php commandline cron job paths)
Line 66: Line 66:
* If you get an error about 'handling of PHP float numbers', please see [[Installation_FAQ#Moodle_claims_PHP_float_handling_is_not_compatible|this FAQ entry]].
* If you get an error about 'handling of PHP float numbers', please see [[Installation_FAQ#Moodle_claims_PHP_float_handling_is_not_compatible|this FAQ entry]].
* You now need some additional PHP modules installed (e.g. intl and the zip extension). If you do not have these, installation them depends entirely on how your PHP was first installed and your operating system.
* You now need some additional PHP modules installed (e.g. intl and the zip extension). If you do not have these, installation them depends entirely on how your PHP was first installed and your operating system.
==Converting courses from 1.9 to 2.0==
At present this does not happen automatically.  An upgrade script is expected with 2.1 to enable the restore of 1.9 backups: https://docs.moodle.org/en/Roadmap#Version_2.1
===Two convertors===
#Conversion thingy http://www.conversionthingy.net/Default.aspx Notes: [http://www.moodlenews.com/2011/conversionthingy2-update-convert-moodle-backups-from-1-9-to-2-0/ Blog Post from Moodlenews]
#Moodle in schools convertor http://www.moodleinschools.org.nz/forum/topics/4730


==See also==
==See also==

Revision as of 08:31, 19 April 2011

Template:Moodle 2.0When upgrading to Moodle 2.0, you must have Moodle 1.9 or later. if you are using an earlier version of Moodle (eg 1.8.x) then you need to upgrade to Moodle 1.9.x first.

We advise that you test the upgrade first on a COPY of your production site, to make sure it works as you expect. Moodle 2.0 is a substantial upgrade and may require more planning and testing than you have become accustomed to in prior upgrades. Please read this page carefully before proceeding.


System requirements

  • PHP must be 5.2.8 or later although the latest 5.3.x is better if you have a choice.
  • Databases should be one of the following:
    • MySQL 5.0.25 or later (InnoDB storage engine highly recommended)
    • PostgreSQL 8.3 or later
    • Oracle 10.2 or later
    • MS SQL 2005 or later
  • Any standards-supporting browser from the past few years, for example:

Moodle 2.0 Planning

Moodle 2.0 is substantially different to the versions that went before it. You should expect much more planning and testing to be involved in upgrading to 2.0. It is highly likely not to be as straightforward as upgrades through earlier versions. Please read this document carefully and follow the advice. Please ask in the forums if you are not sure of anything. Don't try to upgrade your huge 1.9 production site over a weekend with no prior testing.

If you want to "just try it", fine, but please do it on a test copy of your production site.

If your users and admins have become accustomed to Moodle 1.9 you should note that there are some changes in the user interface. Again, it is a very good idea to upgrade a copy of your site and establish how you will be affected by the changes and what training and support your users may require (if any).

Before upgrading please...

NOTE: The upgrade process will irreversibly modify the contents of your database and your moodledata file storage area. If something goes wrong you cannot go back. It is vital that you take good backups of both moodledata and the database in case you have problems with the upgrade. If you are not sure how see Site backup or ask in the moodle.org forums (explaining what your operating system is).

  • It's a good idea to read the Latest release notes and the Moodle 2.0 release notes
  • Always check your site to make sure it meets all system requirements for 2.0 in Administration > Server > Environment
  • Do a full database backup!
  • Do a full moodledata backup
  • Check your backups carefully
  • Remember to purge PHP cache if using any PHP accelerator

A word about optional plugins and themes

If you have added optional or customised plugins (whether your own custom developments or from the plugins and modules database) or are using a non-core theme you must note that these will not work in Moodle 2.0+. While some plugins have been modified to work in Moodle 2.0+ at the time of writing most have not. The themes system is completely different in 2.0+ and all custom themes will require a complete rewrite.

Do not try to include any (old 1.9) optional plugins and themes (or any 1.9 code) in your Moodle 2.0 - it won't work. You should check to see if a 2.0 version is available. If not, you can safely ignore the message that the code is missing for the plugin during the upgrade. You will loose the functionality but the database tables will be retained (dormant) in case a 2.0 version of the plugin is produced in the future.

Checking database schema - old sites

If your 1.9 Moodle site has been upgraded through many prior versions (typically if it first existed prior to version 1.7) it is quite likely that there will be some problems with the database schema (compared to a fresh 1.9 installation). This may cause the upgrade to fail. If your site started life prior to Moodle 1.9 it is a very good idea to check and correct the database schema before upgrading. See Verify Database Schema. You should also run the database integrity checks in the XMLDB editor, see the 'See also' for a link to extra scripts to check for other discrepancies.

Now upgrade

Once you have satisfied the requirements for Moodle 2.0, follow the instructions on the upgrading page.

Moodle 2.0 supports running the upgrade from the command line, rather than through a web browser. This is likely to be more reliable, particularly for large sites.

After upgrade

The config.php file from your 1.9 installation should work fine but if you take a look at config-dist.php that came with Moodle 2.0 there are more/different options available (e.g. database drivers and settings). It's a good idea to map your old config.php settings to a new one based on the 2.0 config-dist.php.

Update your php commandline cron jobs to point to the admin/cli/cron.php :

In versions 1.x, you could execute admin/cron.php either from command line or via the web. Since Moodle 2.0, only admin/cli/cron.php script can be run via command line

Known and Discovered Issues

  • If you get an error about 'handling of PHP float numbers', please see this FAQ entry.
  • You now need some additional PHP modules installed (e.g. intl and the zip extension). If you do not have these, installation them depends entirely on how your PHP was first installed and your operating system.

Converting courses from 1.9 to 2.0

At present this does not happen automatically. An upgrade script is expected with 2.1 to enable the restore of 1.9 backups: https://docs.moodle.org/en/Roadmap#Version_2.1

Two convertors

  1. Conversion thingy http://www.conversionthingy.net/Default.aspx Notes: Blog Post from Moodlenews
  2. Moodle in schools convertor http://www.moodleinschools.org.nz/forum/topics/4730

See also

Using Moodle forum discussions: