How to put WordPress website behind the credential for visitors?
I have put the following code in index.php file. It’s working fine as I was looking. define(‘WP_USERNAME’, ‘PassW0rd$2017’); $error_msg = ”; $status = session_status(); if (PHP_SESSION_DISABLED === $status) { // That’s why you cannot rely on sessions! // return; } if (PHP_SESSION_NONE === $status) { session_start(); } if (isset($_SESSION[‘user_name’]) && $_SESSION[‘user_name’] != ” && $_SESSION[‘user_name’] … Read more