HI Edwin
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.