Skip to content

Username Changer

Username Changer lets people update their WordPress login name (user_login) from their profile - fix a typo, drop an old handle, or match a new brand - without creating a second account. Core WordPress normally locks the username forever; this module unlocks it with validation and a clean session reset.

  • Adds an editable username field on Profile and Users -> Edit (replacing the usual read-only display).
  • Adds the same control on WooCommerce My Account when WooCommerce is active.
  • Validates new names: 3-60 characters, validate_username() rules, uniqueness, and WordPress illegal_user_logins (including names blocked by Block Usernames when that module is enabled).
  • Destroys all sessions for the account when the username changes so old cookies cannot keep a stale login.
  • Warns that the next sign-in must use the new username and that pending password-reset links stop working.

There are no module settings - enable or disable only.

  • Members need to rename accounts after a brand or email-style handle change.
  • Admins frequently fix typos in user_login without SQL.
  • You run WooCommerce and want username edits on My Account.
  1. Go to WP PowerSuite -> Modules.
  2. Filter by Login & Users or search for “Username Changer”.
  3. Turn the module’s toggle on.

That’s it - there is no settings panel. To undo, toggle the module off.

  1. Open Users -> Profile (own account) or Users -> Edit (another user, with permission).
  2. Enter the new username in the Username Changer field.
  3. Confirm the warning and update the profile.
  4. Sign in again with the new username if prompted.

On WooCommerce: My Account -> Account details, change the username field, save, and re-authenticate if sessions were cleared.

  • Change a test user’s username to a valid unused name. ✅ Working: success notice; old username no longer logs in; new one does; other sessions are signed out.

Try a name that is too short, already taken, or blocked.

  • ✅ Working: clear validation error; user_login unchanged.

On a WooCommerce site, repeat from My Account.

  • No username field. Confirm the module is on and your license is active; reload profile / user-edit.
  • “Username already in use.” Pick another name; uniqueness is enforced.
  • “This username is not allowed.” It matches illegal_user_logins or Block Usernames.
  • Still logged in elsewhere after change. Sessions should be destroyed; if a browser still looks signed in, hard-refresh or clear cookies - auth cookies embed the old login until refreshed.
Can users change their username in WordPress by default?

No. Core WordPress locks user_login after account creation. Username Changer adds an editable field on profile and user-edit screens (and WooCommerce My Account when WooCommerce is active).

What happens to active sessions after a username change?

All stored sessions for that account are destroyed. The user must sign in with the new username. Pending password-reset links for the old login stop working.

What usernames are allowed?

3-60 characters, valid per WordPress validate_username rules (lowercase letters, numbers, underscores, hyphens, periods), unique, and not on the illegal_user_logins list (including names blocked by Block Usernames when that module is on).

Are there settings to configure?

No. Username Changer is a simple on/off module with no settings UI. Enable it and the change fields appear where supported.

Developer notes (hooks & filters)

Source: modules/username-changer/module.php only. Boots on the critical tier. Requires an active license. has_advanced_settings: false.

Admin: show_user_profile / edit_user_profile field; personal_options_update / edit_user_profile_update handlers; hides the default read-only username via admin_head-profile.php / admin_head-user-edit.php.

WooCommerce: woocommerce_edit_account_form / woocommerce_save_account_details when in account context.

Validation: length 3-60, validate_username(), uniqueness, illegal_user_logins filter. On success: updates user_login in the users table and destroys session tokens.