Locking out editors

While upgrading LiveWhale, you’ll need to lock out editors so they aren’t editing content at the same time as LiveWhale is updating core files.

Use SFTP to edit /livewhale/core/config.php and find these lines:

$GLOBALS['LIVEWHALE_CONFIG']['UPGRADE_ACCESS_MESSAGE']='LiveWhale is currently undergoing an upgrade. Access will be restored upon its completion. We apologize for any inconvenience.';

Note: Please be very careful when editing /livewhale/core/config.php. LiveWhale does protect against syntax errors in PHP, but it’s still possible for a typo to break things on your calendar. Feel free to reach out to support if you have questions.

Turning on the editor lockout

Set the following line in /livewhale/core/config.php to true:

Turning off the editor lockout

Set the following line in /livewhale/core/config.php to false:

Choosing which users can bypass the lockout

If you’re pulling an upgrade, make sure your username is able to bypass the editor lockout. You might also want to let other users in to test the upgrade before re-opening editor access for all.

The UPGRADE_ACCESS_USER in /livewhale/core/config.php can be set to a single username:

Or, set it to an array to allow multiple users to bypass the lockout:

Now, users on that list can go to /livewhale/?login during the lockout and choose “Click here if you have upgrade access” to login.

Customizing the lockout message

You can customize the lockout message to include additional instructions for your editors. For example:

$GLOBALS['LIVEWHALE_CONFIG']['UPGRADE_ACCESS_MESSAGE']='LiveWhale is currently undergoing scheduled maintenance from 7pm–9pm. Access will be restored upon its completion. If you have any questions—or emergency edits that cannot wait until after 9pm—please contact Bob Jones on the web team at {email}.';