Disable Login With Email Address Feature in WordPress
If you are using WordPress 4.5 or above then WordPress has introduced a new feature where users can log in to their WordPress account using Email Address also. But if you don’t need this feature then you could easily Disable Login with Email Address Feature in WordPress.
Why some users Prefer to Disable Login with Email Adress Feature in WordPress?
WordPress is built in PHP language and if not secured properly then hackers could exploit your account easily.Check out how to Improve the security of your WordPress website and blog to completely secure your WordPress account. Coming to the Login part it is recommended to create usernames which are not predictable. It’s always better to use usernames with alphanumeric with an underscore so that it will be difficult to crack even from the brute force attack.
On the other hand Email, Addresses are predictable and many people use Email ID like admin which are commonly used. Hence, some users prefer to disable Login with Email feature in WordPress.
Turn off Login With Email in WordPress using a Plugin
There is a plugin named No Login by Email Address which you could install to turn off login with Email feature. All you need to do is to install and activate the plugin and rest are taken care by the plugin itself.
Once the plugin is activated the Username/Email is replaced to Username and if anyone types the Email Address and try to log in an error is thrown saying “Invalid Username”.
Manually Disable Login With Email Address Feature in WordPress
If you are an expert or know basic of PHP programming then you could easily disable the Login with Email feature by editing the function.php file.
All you need to do is to Login to your FTP account and navigate to the theme folder. Find the function.php file in the theme folder and add the below code to disable the Login with Email functionality.
remove_filter( ‘authenticate’, ‘wp_authenticate_email_password’, 20 );
Adding the above code will not change anything in the Login page in the sense you will still get a text which says Enter Username/ Email. However if someone tries to login using Email ID then it would throw an error saying “Invalid Username”.
Use this option only if you know about WordPress or PHP else it might break the site. If you are non-expert it’s recommended to download the plugin and install to disable Email address feature in WordPress.