Changing the Login Error Message

How to change the message users see when they enter the wrong credentials in the Manager login screen.

By Bob Ray  |  October 13, 2026  |  2 min read
Changing the Login Error Message

MODX Forum user rajani wanted to know how to change the message users see when they enter the wrong credentials on the Manager login page. In this article, we'll see the best way to do that.

Login Error Message

When users enter the wrong credentials on the Login page, they see an error message. The English version of the default message is:

"The username or password you entered is incorrect. Please check the username, re-type the password, and try again."

What if you don't like that message and want to change it?

It's a little difficult to find. You might suspect that it's a System Setting, but it's not. It's also not a property of the Login snippet. It's a lexicon string. Even if you know that, it can still be a challenge to find. It's not in the login namespace. Actually, it's in login topic of the core namespace.

The language string used for that message is in the core\lexicon\en\login.inc.php file. It looks like this:

$_lang['login_username_password_incorrect'] = 'The username or password you entered is incorrect.  Please check the username, re-type the password, and try again.';

Changing that value in the file would change the message, but that's not a good way to do it. The change would be overwritten whenever you upgrade MODX or re-run Setup. The correct way to do it is to modify the message in Lexicon Management in the MODX Manager.

Go to System (gear icon) -> Lexicons on the MODX Manager's Main Menu. In the first drop-down above the grid, select the core namespace. In the second one, select the login topic. The lexicon string we're looking for is on the second page of the grid by default. Click on the right arrow to get there. Then double-click on value part of the message with the key login_cannot_locate_account. Enter the message you want to display, then click somewhere else in the grid.

You'll have to clear the site cache before your change will show up. The change will be permanent (unless you change it again) and will survive upgrades to both MODX and the Login package.

You can use this technique to change most of the messages displayed in the Manager.

Coming Up

In the next few articles, we'll look at several ways to use dynamic JavaScript in MODX.


About Bob Ray

Bob Ray is the author of the MODX: The Official Guide and dozens of MODX Extras including QuickEmail, NewsPublisher, SiteCheck, GoRevo, Personalize, EZfaq, MyComponent and many more. His website is Bob’s Guides. It not only includes a plethora of MODX tutorials but there are some really great bread recipes there, as well.

Learn more about Bob Ray.