Family Encyclopedia >> Electronics

How to disable login suggestions in WordPress login error messages

Recently, one of our users asked us how they can disable login suggestions in WordPress. By default, WordPress displays error messages when someone enters the wrong 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, we will show you how to disable login suggestions in WordPress login error messages.

How to disable login suggestions in WordPress login error messages

What are login hints in WordPress login error messages?

During login, WordPress displays this error message when a user enters an incorrect username

How to disable login suggestions in WordPress login error messages

If someone enters the correct username with the wrong password, WordPress displays this message:

How to disable login suggestions in WordPress login error messages

If someone tries to guess her username, this error message confirms that they guessed it correctly..

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

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

For added security, you should always use unique usernames and strong passwords for your administrator account. See our guide on the best way to manage passwords for WordPress beginners.

With that said, let's see how to hide these login hints in WordPress login error messages.

To make it easier for you, we've created a video tutorial on how to disable login suggestions in WordPress login error messages.

Subscribe to WPBeginner

However, if you just want to follow the text instructions, you can follow our step-by-step tutorial on how to disable login suggestions in WordPress login error messages.

Hide WordPress login suggestions

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

 function no_wordpress_errors () return 'Algo está mal!'; add_filter ('login_errors', 'no_wordpress_errors'); 

This code adds your custom message as a filter for login errors. This will override the default WordPress login errors.

Now, if someone enters a wrong username, password, or email, WordPress will simply display the "Something is wrong" error without giving any suggestions.

How to disable login suggestions in WordPress login error messages

While this code can hide login errors, it cannot save you from more sophisticated hacking attempts or brute force attacks.

We use Sucuri to protect all of our websites against common security threats. Sucuri includes a website firewall that can block any suspicious activity so you can't access your site. See how sucuri helped us block 450,000 WordPress attacks in 3 months

We hope this article helped you to hide login hints from WordPress login error messages. You may also want to check them out on 13 Tips and Tricks to Protect Your WordPress Admin Area.

If you enjoyed this article, please subscribe to our WordPress YouTube Channel video tutorials. You can also find us on Twitter and Facebook.