If there is a maintenance.html file at the moodledata root, remove it.
Add the follwing line to config.php:
$CFG->maintenance_enabled = ‘0’;
No need to restart anything, just access the site.
The config.php file overrides settings you see in the Moodle UI. So back into that area for setting maintenance mode. Leave your browser there.
Edit the config.php file and comment out the line you added by placing // in front.
Now looks like:
//$CFG->maintenance_enabled = ‘0’;
In your browser, now make the changes to take it out of maintenance mode. The Moodle UI should allow you to do that now.
'spirit of sharing', Ken