prevent anonymous access to WordPress site (non-admin site)

Add this to the top of your header.php file, or a file that will be loaded at the top of every page.

<?php
if(!is_user_logged_in()) {
    wp_redirect('/wp-login.php');
    exit;
}
?>

Someone will probably point out a reason why not to do this, but it’s the first thing that came to mind.