Maintenance module

Written by: Maciej Grajcarek

Date May 1, 2008

Perhaps you have been in a situation when you need to put your cake-based web site in a maintenance mode. Our solution to this problem is very easy and flexible. All you need to do is to download the appropriate module from our svn repository and put files in the proper folders.

Next step is to include the maintenance component in app_controller

var $components = array('Maintenance');

The last thing you have to do is to set parameters in the MaintenanceComponent.

var $active = true;
var $redirect = '/maintenance';
var $usePassword = true;
var $accessPassword = 'secretPassword';

As you can see, you can easily activate/deactivate maintenance mode and allow the users who know the password access the site.

Also, all access requests to the site from the localhost will be allowed.

5 Responses to “Maintenance module”

  1. Chris said:

    Is this module still available? There appears to be a problem with the SVN login.

  2. Julien said:

    Hi, same question. What about this module as we can’t access more to the SVN?

    Thanks

  3. daniel said:

    Hi Julien, check out this post

  4. Chenxi Mao said:

    Hi Daniel:

    It seems the updated svn repository still doesn’t work…

    I tried with svn commandline and also tortoiseSVN.

  5. daniel said:

    hello,

    this would be the svn commando to export this module to your computer:

    svn –username anon –password anon export svn://svn.devayd.com/cake/modules/maintenance maintenance

    regards, daniel

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>