Upgrading to Moodle 2.2
Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: Upgrading to Moodle 2.2.
You can upgrade to Moodle 2.2 from Moodle 2.1, 2.0 or 1.9. If you are upgrading from 2.0, please also read Upgrading to Moodle 2.1 . If upgrading from 1.9, please also read that and Upgrading to Moodle 2.0. After reading this you can upgrade directly to 2.2.
If you are using an earlier version of Moodle, you must upgrade to the latest 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.
- PHP must be 5.3.2 or later
- Required PHP extensions: iconv, curl, ctype, zip, simplexml, spl, pcre, dom, xml, json
- Required PHP memory_limit at least 40MB (64MB or more recommended 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:
- Firefox 3 or later
- Safari 3 or later
- Google Chrome 4 or later
- Opera 9 or later
- MS Internet Explorer 7 or later
Note: The above system requirements are unchanged from Moodle 2.1.
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).
- Read the Moodle 2.2 release notes and check the list of new features
- Check your site to make sure it meets all system requirements for 2.2 in Settings > Site 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
Any contributed plugins (including themes) that you have previously installed on your site will also need to be replaced with a version suitable for Moodle 2.2 before upgrading your Moodle installation.
- Check in the Moodle Plugins directory for a Moodle 2.2 version of the plugin and copy it to the appropriate location in your Moodle code.
- The upgrade of the plugin will happen as part of the Moodle upgrade process.
- If there is not a Moodle 2.2 version of the plugin available, you will need to uninstall the plugin before upgrading, otherwise the Moodle upgrade will fail.
Possible issues that may affect you
- If you have custom reports, there have been changes that may require (simple) changes to be made to their code. See the developer documentation dev:General report plugins for details.
- Global search has been removed from core as it was broken. (A new global search is being written for 2.3.)
- Some web service functions have been deprecated. They still work, but check any web service connections you may have to your Moodle for the future.
Checking database schema - old sites
If your Moodle site has been upgraded through many prior versions it is possible that there will be some problems with the database schema (compared to a fresh 2.0 installation). This may cause the upgrade to fail. If your site started life prior to Moodle 2.0 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.
Once you have satisfied the requirements for Moodle 2.2, follow the instructions on the upgrading page.
On Linux servers, Moodle 2.2 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.
The config.php file from your 2.0 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.2 config-dist.php.
Default frontpage role is not created automatically during upgrade from 1.9.x, it is recommended that administrator creates a new role with frontpage archetype, resets it to default and configures it as default frontpage role - see Front page settings.
Moodle in English forum discussions: