> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Disabling WordPress login hints for better security

> Discover how to disable WordPress login errors with a simple code snippet for generic user messages.

Hiding details of error messages on the login page enhances the security and user confidence for [WordPress](https://hosting.com/hosting/platforms/wordpress-hosting) sites. This article shows how to disable login errors and display a custom message.

## Editing theme file to disable login error hints and display custom error message.

<Warning>
  **Important**

  Always perform a backup before you make any changes to the theme files. If you break any codes, it will be easier for you to revert your site to its last good known state. Alternatively, you could also create a child theme. Read this link on how to create a child theme: [https://www.hosting.com/blog/wordpress-child-theme/](https://www.hosting.com/blog/wordpress-child-theme/)
</Warning>

To disable the login error hint and replace it with a custom message, follow these steps:

1. Log in to your WordPress site with an administrator account.

2. On the **Dashboard** in the left sidebar, click **Appearance**, and then click **Editor**:\
   ![](https://static.hosting.com/kb/kb-wp-loginhints-1.jpg)

3. On the editor page, look at the right column where you see the "Theme Files".Under theme files, you will see a list of all the files related to your theme. In this example, we are using "Twenty Sixteen" theme.Find the file "functions.php"

4. Copy and add the code to the end of the functions.php file. The customised login hint" You are not allowed on this website" will be displayed on the panel

````javascript theme={null}
function wp_remove_login_hint()
{ return 'You are not allowed on this website'; } 
add_filter( 'login_errors', 'wp_remove_login_hint' );
```![](https://static.hosting.com/kb/kb-wp-loginhints-2.png)

## Related articles

- [Adding a custom logo to WordPress](/docs/adding-a-custom-logo-to-wordpress) 

- [Adding external RSS feeds to your WordPress site](/docs/adding-external-rss-feeds-to-your-wordpress-site) 

- [Changing a WordPress account username](/docs/changing-a-wordpress-account-username)

 
````
