# Change Login Form Labels and Button Text

> Renames the field labels and the button on the login screen, for example "Email" instead of "Username or Email Address" and "Sign in" instead of "Log In".

- Type: PHP
- Runs: Run everywhere
- Category: [Login](https://wpide.com/library/category/login/)
- Tags: login, labels, text
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/change-login-form-labels/

## Code

```php
// Original English text => your text.
$wpide_login_labels = array(
    'Username or Email Address' => 'Email or username',
    'Password'                  => 'Password',
    'Remember Me'               => 'Keep me signed in',
    'Log In'                    => 'Sign in',
    'Lost your password?'       => 'Forgot your password?',
);

add_action( 'login_init', function () use ( $wpide_login_labels ) {
    add_filter( 'gettext', function ( $translation, $text, $domain ) use ( $wpide_login_labels ) {
        if ( 'default' === $domain && isset( $wpide_login_labels[ $text ] ) ) {
            return $wpide_login_labels[ $text ];
        }

        return $translation;
    }, 20, 3 );
} );
```

## Notes

Matches the original English strings, so it also works when the site language is not English.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Change Login Form Labels and Button Text" 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/
