users can easily access or hacker’s programmed bots will send login request to your yoursite.com/wp-login page, but #wordpress have a good security with admin login panel, I have a wrote little code using #wordpress #hooks to prevent from other all users from your site wordpress wp admin login page.
Prevent users and programmed bots from your wordpress wp-login
function login_redir(){ error_reporting(0); //make error reporting off, header function will thrown warning if already header sent. if($_GET['mylogin'] !=='your_any_method'){ $siteurl = get_bloginfo('url'); header("location:".$siteurl); //Force to redirect to main domain if php header function cannot redirect. echo '<script>window.location = "'.$siteurl.'";</script>'; die(); } } //add_action to register function add_action('login_head', 'login_redir');
copy this code and paste into your #theme functions.php file.
Note:after integration of this code you cannot view your wp-login page for login, can you use yoursite.com/wp-login.php?mylogin=your_any_method