Site stuck at upgrade running

For example you might see this message: !!! Site is being upgraded, please retry later. !!! Whenever a site upgrade is triggered, an entry is added into the database in the mdl_config table: name=upgraderunning value=unixtimestamp that the upgrade was started This is by design and deliberate to prevent changes to the site while things are…

Verify your Moodle Database Schema against XMLDB

There is a very handy CLI tool admin/cli/check_database_schema.php which compares the structure of your Moodle database against the XMLDB metadata and looks for any issues. These might includes issues such as: Missing tables – they exist in XMLDB but not in your DB (not good!) Unexpected tables – tables in your database not defined in…