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_DISABLED']=false;
$GLOBALS['LIVEWHALE_CONFIG']['UPGRADE_ACCESS_MESSAGE']='LiveWhale is currently undergoing an upgrade. Access will be restored upon its completion. We apologize for any inconvenience.';
$GLOBALS['LIVEWHALE_CONFIG']['UPGRADE_ACCESS_USER']=['username1','username2'];
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.
Note: In LiveWhale 2.17.0+ locking out editors will also disable Form and RSVP submissions (to protect from data loss during database updates or migrations). This was previously configurable using a DISABLE_SUBMISSIONS setting. While the lockout is enabled, front-end visitors will see a maintenance message when viewing forms or event RSVPs (“This site is not currently accepting event registrations due to scheduled maintenance. Please try again later.”).
Turning on the editor lockout
Set the following line in /livewhale/core/config.php to true
:
$GLOBALS['LIVEWHALE_CONFIG']['UPGRADE_ACCESS_DISABLED']=true;
Turning off the editor lockout
Set the following line in /livewhale/core/config.php to false
:
$GLOBALS['LIVEWHALE_CONFIG']['UPGRADE_ACCESS_DISABLED']=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:
$GLOBALS['LIVEWHALE_CONFIG']['UPGRADE_ACCESS_USER']='username';
Or, set it to an array to allow multiple users to bypass the lockout:
$GLOBALS['LIVEWHALE_CONFIG']['UPGRADE_ACCESS_USER']=['username1','username2'];
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}.';