How To Change WordPress Login Error Messages

How To Change WordPress Login Error Messages

Whenever someone try to login into your WordPress dashboard with a invalid password, WordPress generates following error.

ERROR: The password you entered for the username admin is incorrect. Lost your password?

Quick Tip : How to remove WordPress logo from admin bar?

Most of us don’t care about this error, but it can be very useful to a potential hacker in order to search for correct username and password.

You can easily change these errors by simply adding following code snippet to your functions.php file located inside your theme directory,

//Change login errors
add_filter('login_errors', create_function('$a', "return '<b>Error:</b> Invalid Username or Password';"));


Leave a Comment.