Skip to content

How To Change WordPress Login Error Messages

In last post we talked about why and how we should hide the WordPress login error messages. If you don’t want to hide this message, then you can also change it. It is recommended that you either hide or change WordPress login error message to secure your site.

Changing the error message is very simple. Just add a code snippet to WordPress (or directly to your functions.php file):

add_filter('login_errors', create_function('$a', "return '<b>Error:</b> Invalid Username or Password';"));Code language: JavaScript (javascript)

You can also replace the error message with anything by just editing above code. If you know anything more advanced, then don’t forget to share it in the comment section below.

Leave a Reply

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