PressTigers

Changing WordPress Login Error Messages to Remove Hints

An error message is being displayed on the WordPress log-in page whenever a  user enters an invalid username or password. These error messages can create problems and help hackers to find your username, password or email easily. In this article, you will learn a way to remove these hints from log-in page.

Following three can be the scenarios:

1- When a user enters an invalid username, WordPress will display the following error as shown in figure:

Changing WordPress Login Error Messages to Remove Hints-1

2- When a user enters an incorrect password but correct username, the following error is displayed as shown in figure:

Changing WordPress Login Error Messages to Remove Hints-2

3- When a user enters an incorrect password with correct email address, WordPress will show the following error as shown in figure:

Changing WordPress Login Error Messages to Remove Hints-3

Solution

If a hacker wants to guess your username/password/email, then the above mentioned error messages can easily confirm him that he will find them.

You can remove these log-in messages by adding the following code in your Theme‘s functions.php file:

The above mentioned code will replace all the hints from log-in page. Now, If a user enters an invalid username, email or password, the following message will be displayed as shown in figure:

Changing WordPress Login Error Messages to Remove Hints-4

User Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Get in Touch