How to find Moodle version from Database

Sometimes you may need to find what version of Moodle database you have. To find the version of moodle from the database, check in table mdl_config

SELECT * FROM `mdl_config` WHERE `name` LIKE '%release%';
SELECT * FROM `mdl_config` WHERE `name` LIKE '%version%';

These SQL commands will give information about the version of Moodle you are using.

Moodle version from database table

On a Moodle server, after the upgrade release changed to the new version, backup_release show older version

MariaDB [moodle]> select * from mdl_config where `name` like "%release%";
+-----+----------------+---------------------------+
| id  | name           | value                     |
+-----+----------------+---------------------------+
|   9 | backup_release | 3.9                       |
| 417 | release        | 3.10.11 (Build: 20220509) |
+-----+----------------+---------------------------+
2 rows in set (0.000 sec)

MariaDB [moodle]> 

Finding Moodle Version from files

Moodle includes a file in the root directory with the name Version.php, this file contains Moodle version.

See Moodle

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *