Maintenance mode: Difference between revisions
Helen Foster (talk | contribs) (small tidying up) |
Mary Cooch (talk | contribs) (updating for 2→Setting maintenance mode) |
||
Line 8: | Line 8: | ||
==Setting maintenance mode== | ==Setting maintenance mode== | ||
To set maintenance mode in Moodle 2.x, you need to edit a value in the database. As an alternative, it is possible to set via the command line, by calling: | |||
php [moodledir]/cli/maintenance.php --enable | |||
and disabled by | |||
php [moodledir]/cli/maintenance.php --disable | |||
==CLI maintenance mode== | ==CLI maintenance mode== |
Revision as of 16:05, 20 June 2012
Maintenance mode is for preventing any users other than administrators from using the site while maintenance is taking place, though it's not designed to prevent user access during version upgrades.
When users attempt to access a course when your site is in maintenance mode, they obtain a message informing them that the site is in maintenance mode. If you wish, you can create a customized maintenance mode message, perhaps stating when the site will be available again or giving the reason for doing maintenance.
Note: The front page of your site will appear as normal when your site is in maintenance mode. Users will only see the maintenance mode message when they attempt to access a course.
Setting maintenance mode
To set maintenance mode in Moodle 2.x, you need to edit a value in the database. As an alternative, it is possible to set via the command line, by calling:
php [moodledir]/cli/maintenance.php --enable
and disabled by
php [moodledir]/cli/maintenance.php --disable
CLI maintenance mode
Admins can enable CLI maintenance mode by adding file from the command line $CFG->dataroot/climaintenance.html
. The difference from the standard maintenance mode is that all web access is prevented, CLI scripts continue to work. This CLI maintenance mode is used often during CLI version upgrades.
See also
- Using Moodle Maintenance mode? forum discussion