# Generic Login Error Message

> Shows the same error for a wrong username and a wrong password, so the login form does not reveal which usernames exist.

- Type: PHP
- Runs: Run everywhere
- Category: [Login](https://wpide.com/library/category/login/)
- Tags: login, errors, security
- Author: WPIDE Team
- Installs: 6
- Updated: 2026-10-28
- Page: https://wpide.com/library/generic-login-error-message/

## Code

```php
add_filter( 'login_errors', function () {
    return '<strong>Error:</strong> The username, email address or password you entered is incorrect.';
} );
```

## Notes

This replaces every login error, including messages about blocked cookies.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Generic Login Error Message" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
