How to Hide WordPress Login Errors

Posted by Lasantha Bandara on January 18th, 2015 File Under : security, wordpress0 Comment

When someone failed to login into your WordPress admin area (dashboard), WordPress displays an error message describing the reason for that. Some way these information may be helpful to a hacker to find correct username and password for your WordPress admin area. Look at this example error message:

Wordpress Login Error

So if you don’t want to reveal to users that they are using the wrong username or the wrong password, here is a quick tip to hide WordPress login errors.

Paste the following line of code into your theme's functions.php file:

add_filter('login_errors', create_function('$a', "return null;"));

Now WordPress login errors will not be displayed when someone enter wrong login details.

Hide WordPress Login Error

File Under : security, wordpress

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.