Skip to content
Nilesh Shiragave
  • Home
  • Services
  • About Me
  • BlogExpand
    • Javascript
    • PHP
    • React
    • Shopify
    • WordPress
  • ResourcesExpand
    • Code Snippets
  • Contact Me
Nilesh Shiragave

Home - Blog - Wordpress

wordpress change login error message

ByNilesh Shiragave November 26, 2014 Wordpress

In this post I will show you how to change login error message on a wordpress website. It is needed because default error messages prints username which is not good for wordpress website security.
To change wordpress login error message you have to add a filter using login_errors.

Just add following lines of code inside your current themes functions.php file inside a php code. This code will change login error message to a custom error message.

1
2
3
4
5
6
// Use a Custom Error message on wordpress login page for Better Security
function snilesh_custom_login_errors(){
    return ' <strong>ERROR</strong>: Please check your username and password. ';
}
 
add_filter( 'login_errors', 'snilesh_custom_login_errors' );
Post Tags: #error message#login error#login screen#wordpress error#wp error
Nilesh Shiragave

Experienced Full Stack Developer from India with 15+ years in web development. Capturing moments through the lens as a passionate photographer.

Post navigation

Previous Previous
best social sharing plugin for wordpress 2014
NextContinue
How To Optimize Shopify To Improve Conversion

ADVERTISEMENTS

Disclosure: This content may contain a few affiliate links, which means if you click on them, I will get a commission (without any extra cost to you).

LOOKING FOR A DESIGN AND DEVELOPMENT PARTNER?

LET’S WORK TOGETHER

About Me


Hello, everyone! My name is Nilesh Shiragave. I’m from India. I have over 16 years of extensive experience in web development.

Recent Articles


  • Uplead Review – Is This B2B Lead Generation Tool Worth It in 2025?
  • How to Connect Bricks Builder Forms to HubSpot Using a Private App Token [Without Plugin]
  • Essential Shopify Apps to Boost Your eCommerce Store in 2025
  • Wix vs. Squarespace vs. WordPress: Which is Best for Your Website?
  • Best Free WordPress Themes for Photography
  • How to Upgrade or downgrade the WordPress version using WP CLI

Copyright 2025 | All Rights Reserved

Home About Blog Contact
  • Facebook
  • Twitter
  • LinkedIn
Scroll to top
  • Home
  • Services
  • About Me
  • Blog
    • Javascript
    • PHP
    • React
    • Shopify
    • WordPress
  • Resources
    • Code Snippets
  • Contact Me
Search