PHP and DBMS compatibility of major Moodle releases

Moodle
Author

Visvanath R.

Published

August 17, 2021

Last edited: 2025-08-17 08:45 UTC

We get a non-ending stream of requests in the moodle.org forums from people having trouble in marching old Moodle installations to newer versions. Things break easily since along the path the system requirements have been evolving too. The following table summarizes their dependencies.

Target  Earliest 
from
 PHP   MySQL   PgSQL   MariaDB 
 min.   max.   min.   max.   min.   max.   min.   max. 
1.6[1] 1.0 4.3.0 5.6 4.1.16 ? 8.0 ? - -
1.9[2] 1.6 4.3.0 5.6 4.1.16 5.7? 8.0 ? - -
2.2[3] 1.9 5.3.2 5.6 5.0.25 5.7? 8.3 ? - -
2.4 2.2 5.3.2 5.6 5.1.33 5.7? 8.3 ? - -
2.7 (LTS) 2.2 5.4.4 5.6 5.5.31 5.7? 9.1 ? 5.5.31 10.2
3.0 2.2 5.4.4 7.0 5.5.31 5.7? 9.1 ? 5.5.31 10.2
3.1 (LTS) 2.7 5.4.4 7.0 5.5.31 5.7 9.1 ? 5.5.31 10.2
3.2 2.7 5.6.5 7.1 5.5.31 5.7 9.1 ? 5.5.31 10.2
3.3 2.7 5.6.5 7.1 5.5.31 5.7 9.3 ? 5.5.31 10.2
3.4 3.0 7.0 7.1 5.5.31 5.7 9.3 ? 5.5.31 10.2
3.5 (LTS) 3.1 7.0 7.2 5.5.31 8.0 9.3 ? 5.5.31 10.5
3.6 3.1 7.0 7.3 5.6 8.0 9.4 ? 10.0? 10.5
3.7 3.2 7.1 7.3 5.6 8.0 9.4 ? 10.0? 10.5
3.8 3.2 7.1 7.4[4] 5.6 8.0 9.4 ? 10.0? 10.5
3.9 (LTS) 3.5 7.2 7.4 5.6 8.0 9.5 ? 10.2.29 10.6 (not 10.6.0-10.6.6)
3.10 3.5 7.2 7.4 5.7 8.0 9.6 ? 10.2.29 10.6 (not 10.6.0-10.6.6)
3.11 3.6 7.3 8.0[5] 5.7 8.0 9.6 ? 10.2.29 10.6 (not 10.6.0-10.6.6)
4.0 3.6 7.3 8.0[5] 5.7 8.0 10 ? 10.2.29 10.6 (not 10.6.0-10.6.6)
4.1 (LTS) 3.9 7.4 8.1[6] 5.7 latest 12 ? 10.4 10.11
4.2 3.11 8.0[8] 8.2[7] 8.0 latest 13 ? 10.6.7 latest
4.3 3.11.8 8.0[8] 8.2 8.0 latest 13 ? 10.6.7 latest
4.4 4.1.2 8.1[8] 8.3 8.0 latest 13 ? 10.6.7 latest
4.5 (LTS) 4.1.2 8.1[8] 8.3 8.0 latest 13 ? 10.6.7 latest
4.6 (special)[9] 4.1.2 8.1[8] 8.3 8.0 latest 13 ? 10.6.7 latest
5.0 4.2.3 8.2 8.4[10] 8.4 latest 14 ? 10.11.0 latest
  1. Release 1.6 was a de-facto LTS, supported for 3 years
  2. Release 1.9 was a de-facto LTS, supported for 6 years
  3. Upgrade from 1.9 to 2.x broke so many things, it is advisable to rebuild the site - either through course backups and restore or create courses from scratch making use of the numerous new features added since then
  4. PHP 7.4 since release 3.8.3. See MDL-66260.
  5. PHP 8.0 since Moodle 3.11.8 and 4.0.2. See MDL-70745.
  6. PHP 8.1 since Moodle 4.1.2. See MDL-73016.
  7. PHP 8.2 since Moodle 4.2.3. See MDL-76405
  8. 64 bit PHP only. See MDL-76405
  9. Released December 2024 Announcement and discussion
  10. MDL-80117

Since this post doesn’t specify an explicit image, the first image in the post will be used in the listing page of posts.