Yii Maintenance Mode

This tutorial will useful to change your yiiframework website to maintenance mode. User can access maintenance file only.

Maintenance Controller

Make or Point the controller action to maintenance mode.

1 return array(
2 'catchAllRequest'=> array('site/maintenance'),
3 ............
4 ............

Maintence File

Make or Point the file to maintenance mode. If the condition file_exists() return false, The maintenance mode will be off or not work.

1 'catchAllRequest'=>file_exists(dirname(__FILE__).'/.maintenance')
2         array('site/maintenance') : null,

Leave a Reply

Your email address will not be published. Required fields are marked *