I created a snippet called RestrictAccess and added it to the top of all the templates, uncached:
[!RestrictAccess!]:
<?php
if (!($mgrUserId = $modx->getLoginUserID('mgr'))) {
$modx->sendUnauthorizedPage();
}
?>
Then I created a page called "Unauthorised Access", used the "Blank" template and pasted in some temporary html formatting. In Tools/Configuration use this page id for the "Unauthorised Access" field.
So long as you are logged into the Manager you can view your site but the public can’t. If they stray upon one of your new pages accidentally they’ll be redirect to the Unauthorised Access page instead.
Alternatively, you could set the snippet to redirect to the home page, skipping the "Unauthorised Access" instructions.
When you’re ready to roll simply delete the snippet from your templates and move your old web site code into another folder for backup