SUBSCRIBE

Moodle site stuck up in Maintenance mode – how to proceed??

--- Advertisement ---

Connected 2023
Connected Conference OpenLMS

Recently one of my development Moodle site stuck up in the maintenance mode due to which I was not able to see any page on my Moodle site. A quick search on Moodle forums brought up so many tricks to restore the site back which I thought to share with all of my fellow readers.
The steps which you can take to restore your site back are:

  • Appending ‘/login/index.php’ in the URL of your site name – If you add ‘/login/index.php’ in the site URL then you can access the login page of your Moodle site e.g. if your site is running with a domain name http://yourdomainname.com then you can directly type http://yourdomainname.com/login/index.php in the address bar of your browser. It will allow you to login into your Moodle site and turn off the maintenance mode in the settings through Site Administration > Server > Maintenance Mode.
  • Directly trying the URL – http://yourdomainname.com/admin/settings.php?section=maintenancemode which will again takes you to the login page and then redirects you to the maintenance page where you can turn off the maintenance mode.
  • Through Command line (CLI) –
         cd moodlecode/admin/cli/
         php maintenance.php --disable
  • Through Database – If you have database access then also you can deactivate the maintenance mode by changing the variable named “maintenance_enabled” to “0” in the “mdl_config table“. (that’s a zero.  1 is on)
  • Editing the config.php file – If you have access to your config.php file then you can add the following line in your config.php file:
    • $CFG->maintenance_enabled=0; (that's a zero and be sure to include the ';' at the end of that line.

Also check for a file maintenance.html in the Moodledata directory and delete it.
These are the different tricks which I collected during my search on Moodle forums. If you are still stuck up in the maintenance mode then better post a new thread in the Moodle forums or else share your tips in comments and I will update the article.
References:

 

2 Responses

  1. Well,

    My 2c as it worked on a Moodle 3.5.1 to enter the url “http://yourdomainname.com/admin/settings.php?section=maintenancemode”, but strangely enough NOT on a moodle 3.10.11 although I did put eh $CFG maintenance_enabled=0 + the correction ion the database !

    So my solution after a strong fighting was to restore all of my site from my SP hosting my sites : after several attempts, it came out that the stuck aspect was coming from the moodle data directory, and not only from the config.php file event after the change mentionned before, nor the the addendum in the database, althoug there was NO maintenance.html page at the root level of this very directory.

    Very odd, IMHO

    Good day

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Dive Deeper On

The Latest

The eLearn Podcast

Connected Conference OpenLMS

--- Advertisement ---

Post Pages - Sidebar 4 - CourseMerchant

--- Advertisement ---

Post Pages - Sidebar 7 - Titus Learning

--- Advertisement ---

Post Pages - Sidebar 5 - Edwiser (RemUI)

Subscribe to our newsletter

Education technology has the power to change lives. 

To get the latest news, information and resources about online learning from around the world by clicking on the button below.