Switch WordPress Users and Rename Usernames with DevKit Pro
To test a site as another user, you usually log out, log back in as that user, and repeat the whole thing every time you switch roles. WordPress also won't let you rename a username once the account exists. The Users Manager in DevKit Pro adds a user switcher to the admin bar and lets you edit usernames, emails and roles from one screen.
Enable Users Manager
The feature is off by default, so it adds nothing to your admin until you turn it on.
- Go to DevKit → Settings.
- Enable Users Manager.
- Reload the page.
The manager needs a full page, so it lives under Users → Users Manager and not inside the DevKit screen. After you enable it, a Users Switch item also appears in the top admin bar.
Quick-switch users from the admin bar
When you test permissions, content or layouts for different accounts, logging in and out takes most of the time. With the switcher, changing accounts takes one click.
- Open Users → Users Manager.
- Tick the Topbar checkbox for each user you want in the switcher. Only ticked users show up in the Users Switch dropdown.
- Open Users Switch in the admin bar and pick a user. The "Howdy" greeting changes to that account right away.
In the video we had two users in the dropdown, ticked a third, and then switched from test to developer to test2 and back without seeing the login screen.
Rename a username (core WP can't)
In core WordPress, the Username field on the profile screen is disabled. If you want a different username, you have to create a new account. The Users Manager lets you edit the username in place.
- In Users Manager, edit the username in the row.
- Click Save (or Cancel to discard).
If you rename the account you're logged in as, WordPress logs you out and you log in again with the new username. We renamed developer to dev and had to log back in. Renaming other users doesn't log you out.
Set email and roles
Each row in the same edit view has an email field and a Role dropdown, so you can fix a test account's email or change its role without opening its profile. Change the value and click Save.
Search users for quick switch
On a site with a long user list, scrolling to find one account is slow. Type in Search users… and click Search to filter the table. From the results you can:
- tick Topbar to add the user to the quick switcher,
- click Switch to log in as that user right away,
- click Profile to open their WordPress profile.
Get DevKit → dplugins.com