Sunday, May 1, 2016

How to Change Login Hints in WordPress Login Error Messages

with 194 comments
some people ask how they can change or disable login error hints in WordPress. By default, WordPress show error messages when someone enters incorrect username or password on the login page. These error messages can be used as a hint to guess a username, user email address, or password. In this article, let's find out how we can change login error hints in WordPress login error messages.


what do i mean by WordPress Login Error Messages?


During login, WordPress shows this error message when a user enters incorrect username.

ERROR: invalid username Lost Your Password?







If someone enters correct username with wrong password, then WordPress shows this message:

If someone is trying to guess your username, then this error message confirms that they have successfully guessed it.

Since WordPress 4.5, you can also login to your WordPress site using email address instead of username. These login hints can also confirm that you are using a particular email address for your admin account.

For most WordPress users this is probably not a big issue. But for people who are cautious about privacy and security, this could be a problem.

Change Login Hints in WordPress.


Simply add the following code to your theme’s functions.php file or a site-specific plugin.

function no_wordpress_errors(){
      return 'Something is wrong!';
    }
    add_filter( 'login_errors', 'no_wordpress_errors' );


Now if someone enters incorrect username, password, or email, WordPress would simply show the error ‘Something is wrong’ without giving any hints.


While this code can hide/change login errors, it cannot save you from more sophisticated hacking attempts or brute force attacks, it is just to save you from guessing login combinations by humans.






That's it, comment Down What do you Think? have any better suggestions ?
Share This Article on social, or to your friends.
Happy Blogging !

Also Read,
Powered by Blogger.

Connect With Us