Difference between revisions of "Maintenance mode"

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Maintenance mode.

(small tidying up)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Server settings}}
 
{{Server settings}}
<p class="note">'''Please refer to [[Page_notes#Server settings|these notes]] before editing this page.'''</p>
+
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''.
 
 
Location: ''Administration > Server > Maintenance mode''
 
 
 
Maintenance mode is for preventing any users other than administrators from using the site while maintenance is taking place. '''Please note this maintenance mode is 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.
 
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.
Line 12: Line 8:
 
==Setting maintenance mode==
 
==Setting maintenance mode==
  
To put your site in maintenance mode:
+
An administrator can put the site into maintenance mode in ''Settings > Site administration > Server > Maintenance mode''.
  
#Access ''Administration > Server > Maintenance mode''.
+
If for some reason the web interface is not available you can also put the Moodle installation in maintenance mode by creating a file called ''maintenance.html'' in the folder called ''1'' (i.e. numeric 'one') in your moodle data folder. Any text in that file will be displayed to users trying to access anything other than the frontpage.
#Click the Enable button.
 
  
If for some reason the webinterface is not available you can also put the Moodle installation in maintenance mode by creating a file called ''maintenance.html'' in the folder called ''1'' (i.e. numeric 'one') in your moodle data folder. Any text in that file will be displayed to users trying to access anything other than the frontpage.
 
 
----
 
 
When you go into Maintenance mode and create this file you will need to test the Maintenance mode to make sure that you can come out of Maintenance mode and a non admin user can login. If they can't you may have to delete the maintenance.html for non admin users to be able to login. Be sure it works before you are stuck in Maintenance mode and non admin users are unable to login past the front page.
 
When you go into Maintenance mode and create this file you will need to test the Maintenance mode to make sure that you can come out of Maintenance mode and a non admin user can login. If they can't you may have to delete the maintenance.html for non admin users to be able to login. Be sure it works before you are stuck in Maintenance mode and non admin users are unable to login past the front page.
  
{{Moodle 1.9}}In Moodle 1.9.3 onwards, when a site is in maintenance mode, the link "In Maintenance Mode" is displayed near the top right of each page (except the front page) for admins.
+
When a site is in maintenance mode, the link "In Maintenance Mode" is displayed near the top right of each page (except the front page) for admins.
  
 
==CLI maintenance mode==
 
==CLI maintenance mode==
{{Moodle 2.0}}In Moodle 2.0 there is a new ''CLI maintenance mode'', admins can enable this mode by adding file from the command line <code>$CFG->dataroot/climaintenance.html</code>. 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.
+
 
 +
Admins can enable CLI maintenance mode by adding file from the command line <code>$CFG->dataroot/climaintenance.html</code>. 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==
 
==See also==
 
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=46451 Maintenance mode?] forum discussion
 
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=46451 Maintenance mode?] forum discussion
 
[[Category:Administrator]]
 
  
 
[[eu:Mantenu-modua]]
 
[[eu:Mantenu-modua]]

Latest revision as of 07:20, 20 October 2011

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

An administrator can put the site into maintenance mode in Settings > Site administration > Server > Maintenance mode.

If for some reason the web interface is not available you can also put the Moodle installation in maintenance mode by creating a file called maintenance.html in the folder called 1 (i.e. numeric 'one') in your moodle data folder. Any text in that file will be displayed to users trying to access anything other than the frontpage.

When you go into Maintenance mode and create this file you will need to test the Maintenance mode to make sure that you can come out of Maintenance mode and a non admin user can login. If they can't you may have to delete the maintenance.html for non admin users to be able to login. Be sure it works before you are stuck in Maintenance mode and non admin users are unable to login past the front page.

When a site is in maintenance mode, the link "In Maintenance Mode" is displayed near the top right of each page (except the front page) for admins.

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