How to Disable Login Hints in WordPress Login Error Messages

How to Disable Login Hints in WordPress Login Error Messages

Want to disable login hints in WordPress login error messages?

By default, the WordPress login page shows an error message when someone types in the wrong username or password. However, these error messages can help hackers guess your username, email address, or password.

In this article, we will show you how to disable login hints in WordPress login error messages, and keep your website safe.

Every time someone tries to log into your site using the wrong username or password, WordPress will show an error message on the login screen.

If this person typed in the wrong username or email address, then WordPress shows the following error: ‘The username is not registered on this site. If you are unsure of your username, try your email address instead.’

This may be helpful for genuine users, but it also lets any hackers know that they are typing in the wrong username.

If you type in the right username but the wrong password, then WordPress will show a different error: ‘The password you entered for the username is incorrect. Lost your password?’

If someone is trying to guess your username, then this error message confirms that they have guessed it successfully. Now they just need to guess or steal your password.

WordPress website owners can also log into their site using an email address instead of their username. This means that a hacker could type in different email addresses, to try and figure out which address you’re using for your WordPress account.

As soon as the hacker guesses the right email address, WordPress will switch over to the ‘The password you entered for the username is incorrect’ error.

To protect your WordPress blog or site against hackers, you should always use a unique username and a strong password for your account.

If you’ve added other WordPress users or authors to your site, then you may also want to use a WordPress plugin to force your users to create a strong password.

While these steps are a great start, the login hints can still help hackers break into your site. With that in mind, let’s look at how you can hide the login hints in WordPress login error messages.

To make it easy, we have created a video tutorial on how to disable login hints in WordPress login error messages.

If you prefer text instructions, then you can follow our step by step tutorial on how to remove login hints from the WordPress error messages.

The easiest way to disable login hints in WordPress login error messages is by pasting some code into WordPress.

You can add the following code snippet to the bottom of your site’s functions.php file or by using a code snippets plugin like WPCode (recommended). Using the code snippets plugin is easiest for beginners.

This code tells WordPress to show a custom message instead of the default login error. In the sample code above, we’re using ‘Something is wrong!’ as our error message.

You can change this line to show any message that you want. For example, here we’re using ‘Your username or password is incorrect’ as our error message:

If you’re editing your functions.php file or using the code snippets plugin, then don’t forget to save your changes.

If you’ve created a site-specific plugin, then you’ll need to install and activate your site-specific plugin. If you need help, then see our guide on how to install a WordPress plugin.

Once you’ve done that, it’s a good idea to test your new error message. To do this test, simply head over to your website’s login page and type in a wrong username, password, or email. Then, click on the ‘Log In’ button.

WordPress will now show your new error message without giving you any hints.

While this code will disable login hints in WordPress, it won’t protect you from more advanced attempts or brute force attacks.

The easiest way to stop hackers from getting into your site is with a WordPress security plugin. We use Sucuri to protect all our websites against common security threats.

Sucuri comes with a website firewall that can stop suspicious internet users from even reaching your site. For more information, see how Sucuri helped us block 450,000 WordPress attacks in 3 months.

We hope this article helped you learn how to hide login hints from WordPress login error messages. You may also want to see our guide on how to get a free SSL certificate, and our expert pick of the best WordPress plugins for business websites.

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

Images Powered by Shutterstock