It's from an init.php file:
// Recovery mode
// Will turn off third party customisations if one is causing an issue that prevents
// accessing the AdminCP. See https://remoteservices.invisionpower.com/docs/recovery_mode
'RECOVERY_MODE' => FALSE,
Add it of course:
\define( 'RECOVERY_MODE', true );