A Wolff project can enter into maintenance mode quite easily.
maintenance_on defined in the
config.php file indicates if the project is under maintenance or not, just change its value to
true if you want to activate it.
When under maintenance, a default
_maintenance.php controller will be called if the client IP address isn't in the white list.
A white list file is the one that defines which IP address will still have access to the page content when it's under maintenance.
It should be located under the
system/definitions directory and should be named
You can create it in a fast way calling the
Adding an IP address to the white list:
If the white list file doesn't exists, it will be created automatically.
Deleting an IP address from the white list:
Get all the IP address in the white list:
This will return the IP list as an array.
You can know if the current client IP address is in the white list with the following method:
Remember that you can add and remove IPs using the CLI of Wolff too.