Skip to content
WordPress.org
  • Showcase
  • Plugins
  • Themes
  • Hosting
  • News
    • Learn WordPress
    • Documentation
    • Education
    • Forums
    • Developers
    • Blocks
    • Patterns
    • Photos
    • Openverse ↗︎
    • WordPress.tv ↗︎
    • About WordPress
    • Make WordPress
    • Events
    • Five for the Future
    • Enterprise
    • Gutenberg ↗︎
    • Job Board ↗︎
  • Swag ↗︎
  • Get WordPress
Get WordPress
WordPress.org

Plugin Directory

EffortLess Multisite Change Username

  • Submit a plugin
  • My favorites
  • Log in
  • Submit a plugin
  • My favorites
  • Log in

EffortLess Multisite Change Username

By domclic
Download
  • Details
  • Reviews
  • Installation
  • Development
Support

Description

WordPress does not let you edit the login name (user_login) of an account. This plugin adds one admin page that changes it for any user, together with the public name fields. You pick the user by login name, email address or user ID (a login that is only digits is tried as a login before it is read as an ID); leaving the box empty selects your own account. The user ID is not touched, so posts, roles, email address, password and other user meta stay attached to the account.

The page edits these fields of the selected user:

  • Login username (user_login)
  • Email address (user_email)
  • Author URL slug (user_nicename)
  • Public display name (display_name)
  • Nickname
  • First name
  • Last name

The login name is written first with a single $wpdb->update() on the row of the selected user’s ID, because core has no function for it, and the user cache is cleared around it. The super admin list follows, then the profile fields are saved with wp_update_user(). If a later step fails, the earlier ones are put back, so a failed save leaves the account as it was. If you rename the account you are signed in with, a new authentication cookie is issued for the same user ID so your current session is not ended. Other users’ sessions end, because authentication cookies contain the login name.

On Multisite, a username is stored once for the whole network, so a rename applies to every site and the page is available only to super admins. On a single site it is available to users with the manage_options capability. If the old login name is listed in the network’s super admin list (site_admins), the list is updated to the new name. If that update fails, the old login name is written back and nothing is changed.

Settings and fields

  • Login username – 3 to 60 bytes. Must pass WordPress validate_username(), must not already belong to another account and must not appear in the illegal_user_logins filter or, on Multisite, in the network’s “Banned Names” list. On Multisite the rules WordPress applies to new network users also apply to a changed login: at least 4 characters, lowercase letters and numbers only, not only numbers, and not reserved by a pending sign-up from the last two days. A login you leave unchanged is not checked against these rules.
  • Email address – must be a valid address not used by another account. On Multisite a changed address must also pass the network’s “Banned Email Domains” and “Limited Email Registrations” settings and must not be reserved by a pending sign-up. It is saved at once, without the confirmation email WordPress sends when users change their own address. A checkbox (off by default) sends WordPress’s notice about the change to the previous address.
  • Administration email – optional checkbox, off by default. When ticked and the email changes, the administration email is replaced with the new address if it equals the old one, ignoring letter case. On a single site this is the email in Settings > General. On Multisite, Network Admin replaces only the network administration email (Network Settings); a site’s own screen replaces the network email and that site’s email. Other sites of a network are not changed. The value is saved at once, without the confirmation email WordPress normally sends for this setting.
  • Author URL slug – up to 50 bytes. Converted with sanitize_title(). Must not be used by another account. This is the part of the author archive URL (/author/slug/); links to the old slug stop working unless you add a redirect.
  • Public display name – required, up to 250 bytes.
  • Nickname – required.
  • First name / Last name – optional.
  • Other copies of the old login – optional checkbox, off by default. When ticked and the login changes, the author URL slug, display name and nickname are replaced with the new login if they still equal the old one. Unticked, they keep the values shown in the form.
  • Your current password – required. This is the password of the account you are signed in with, not of the renamed user. It is checked with wp_check_password() before anything is changed. It is not stored and not changed. After 5 wrong passwords the page refuses further attempts from that account for 15 minutes.
  • Backup confirmation checkbox – required. The form is not processed without it.

Notes and limitations

  • On Multisite the change applies to every site, because the user table is shared. There is no per-site login name.
  • Other plugins can react to a rename with the elmcu_login_changed action (arguments: user ID, old login, new login).
  • Other plugins that store the login name as text (security plugins, allow lists, external services, single sign-on) are not updated and may need to be changed by hand.
  • The plugin stores no options and creates no database tables. Deleting it leaves the renamed account as it is.
  • The page sends no emails, except the optional notice to the previous address when you tick that checkbox.
  • After an error the values you typed are shown again for 5 minutes (the password and the backup checkbox are not kept).

External services

This plugin does not connect to any external service. The “Support the development” notice on the plugin page contains a link to https://id7.dev/donate/ that opens only when you click it.

Installation

  1. Upload the effortless-multisite-change-username folder to /wp-content/plugins/, or install the zip from Plugins > Add New > Upload Plugin.
  2. Activate the plugin. On Multisite, network-activate it: the page then appears in Network Admin and on every site.
  3. Make a database backup.
  4. Go to Users > Change Username (on Multisite: Network Admin > Users > Change Username).
  5. Start typing a login, email address or name and pick the user from the suggestions (or type a login, email address or ID in full), then click “Load user” (or leave the box empty for your own account), then enter the new values, type your current password and tick the backup checkbox.
  6. Click “Save Account Identity”. A notice shows the result.
  7. If you are signed out, sign in again with the new login username and your existing password.

FAQ

I configured it but nothing happens.

Check that:

  • You are signed in as an administrator (manage_options capability) who can edit that user.
  • On Multisite, you are a network super admin. Other users do not see the menu item.
  • The current password is correct and the backup checkbox is ticked.
  • The new login name is valid, not used by another account and not on a banned list. On Multisite it is at least 4 characters of lowercase letters and numbers.
  • You have not entered a wrong password 5 times in the last 15 minutes.
  • The page shows an error notice after saving; the text states which check failed.

Can I rename other users?

Yes. Enter their login, email address or ID in the “User to rename” box. The confirmation password is always your own.

Will my posts be kept?

Yes. The user ID does not change, and posts reference the user ID.

Will the renamed user stay signed in?

No. Authentication cookies contain the login name, so cookies issued before the change stop working. Only when you rename your own account does the browser you used receive a new cookie.

Are old author links redirected?

No. After you change the author URL slug, the old /author/old-slug/ address no longer resolves to your archive.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“EffortLess Multisite Change Username” is open source software. The following people have contributed to this plugin.

Contributors
  • domclic

Translate “EffortLess Multisite Change Username” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.11

  • A failed save no longer leaves a half-changed account: the login name and the super admin list are written first and are put back if the profile fields cannot be saved.
  • A login made only of digits is looked up as a login before it is read as a user ID, and the page keeps the exact user after saving.
  • On Multisite, a changed login and email follow the network rules for new users (length, characters, banned and limited email domains, pending sign-ups).
  • The administration email option from Network Admin changes only the network email; the option is documented as saved without WordPress’s confirmation email.
  • The current-password check allows 5 wrong attempts per 15 minutes.
  • The values typed in the form are shown again after an error.
  • The user search ignores answers that arrive out of order.
  • The “remember me” state of the renamed account’s own session follows the site’s cookie lifetime filter.
  • The readme now states that the optional email notice is the only email the page can send.

1.0.10

  • Release package no longer contains development files (version control data and editor settings).

1.0.9

  • Translation files (.pot, .po, .mo) for Spanish, Traditional Chinese, Korean, French, Japanese, German, Italian and Brazilian Portuguese are included in the languages folder.

1.0.8

  • The “User to rename” box suggests existing users while you type (login, email address, slug or display name), up to 15 at a time.

1.0.7

  • The page title is “EffortLess Multisite Change Username”.

1.0.6

  • The page is available under each site’s Users menu as well as under Network Admin > Users, for users who may use it.
  • Optional checkbox to replace the old email address in the network administration email and in the administration email of the current site when it equals the old address.

1.0.5

  • The email address of the selected user can be changed. It is applied immediately; the standard “email address changed” notice to the previous address is sent only if the checkbox is ticked.

1.0.4

  • On Multisite the page is added to Network Admin > Users when the plugin is network-activated. If it is activated on a single site only, it stays under that site’s Users menu.

1.0.3

  • Any user can be renamed: choose them by login, email address or ID.
  • Optional checkbox to carry the new login into the slug, display name and nickname when they still equal the old login.
  • The confirmation password is the signed-in administrator’s own.

1.0.2

  • A login name containing characters WordPress does not allow is rejected instead of being cleaned up silently.

1.0.1

  • Renamed the plugin and its prefix, translatable strings, readme and admin page styling added.
  • Form values are read in the same function that verifies the nonce.
  • The author slug lookup uses the %i identifier placeholder.

1.0.0

  • Initial draft.

Meta

  • Version 1.0.11
  • Last updated 11 hours ago
  • Active installations Fewer than 10
  • WordPress version 6.2 or higher
  • Tested up to 7.1.4
  • PHP version 7.4 or higher
  • Tags
    loginmultisiteprofilerenameusername
  • Advanced View

Ratings

No reviews have been submitted yet.

Your review

See all reviews

Contributors

  • domclic

Support

Got something to say? Need help?

View support forum

Donate

Would you like to support the advancement of this plugin?

Donate to this plugin

  • About
  • News
  • Hosting
  • Privacy
  • Showcase
  • Themes
  • Plugins
  • Patterns
  • Learn
  • Documentation
  • Developers
  • WordPress.tv ↗
  • Get Involved
  • Events
  • Donate ↗
  • Swag ↗
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org

The WordPress® trademark is the intellectual property of the WordPress Foundation.

  • Visit our X (formerly Twitter) account
  • Visit our Bluesky account
  • Visit our Mastodon account
  • Visit our Threads account
  • Visit our Facebook page
  • Visit our Instagram account
  • Visit our LinkedIn account
  • Visit our TikTok account
  • Visit our YouTube channel
  • Visit our Tumblr account
Code is Poetry