Moodle Upgrade Tips 2.5.9 to 2.7 and to 2.7 to 3.1

It’s few years that i’m assisting an Italian Professor in curating an e-learning website where he keeps trace of his Academic Courses. The website is built with Moodle.

Moodle is a learning platform designed to provide educators, administrators and learners with a single robust, secure and integrated system to create personalised learning environments.

The website is hosted on a shared server and i just went through upgrading from version 2.5.9 to 2.7 and from 2.7 to 3.1 (direct upgrade from 2.5.9 to 3.1 is deprecated).

I will be very concise just about two main warnings got during the update, not covering the whole process, since You can easily find it in the Moodle Docs.


To enable opcache on your shared hosting, just insert the code below in the php.ini (or create a new php.ini file if not present) in your domain root of your moodle installation .

Note: when using NON-Windows platforms, you have to use the zend_extension configuration to load the OPcache extension into PHP by adding it on top of your php.ini.
Supposing you are using php56, search the path to, in our example code:

So, the whole fix:


opcache.enable = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 8000
opcache.revalidate_freq = 60

; Required for Moodle
opcache.use_cwd = 1
opcache.validate_timestamps = 1
opcache.save_comments = 1
opcache.enable_file_override = 0

; If something does not work in Moodle
;opcache.revalidate_path = 1 ; May fix problems with include paths
;opcache.mmap_base = 0x20000000 ; (Windows only) fix OPcache crashes with event id 487

; Experimental for Moodle 2.6 and later
;opcache.fast_shutdown = 1
;opcache.enable_cli = 1 ; Speeds up CLI cron
;opcache.load_comments = 0 ; May lower memory use, might not be compatible with add-ons and other apps.

SECOND WARNING: Convert InnoDB file format (Antelope) to Barracuda
The error is due to the fact that the MySQL default InnoDB file format (Antelope) cannot handle more than 10 text columns. Thus you are recommended to change the InnoDB file format to Barracuda.

In this case, i didn’t apply the conversion, but went successfully through the upgrade process and still having my installation working perfectly.

So… if it works, don’t worry about it!