Latest version: 0.2.1 – Released June 8, 2009
Description
This plugin allows you to quickly swap between user accounts in WordPress at the click of a button. You'll be instantly logged out and logged in as your desired user. This is handy for test environments where you regularly log out and in between different accounts, or for adminstrators of blogs with multiple accounts who need to switch between them.
Features
- Instant switching and redirection to the WordPress Dashboard.
- Instant switching back to the originating account.
- It's completely secure (see the "Security" section below).
- WordPress and WordPress MU compatible (watch out for a bbPress version soon).
Security
- Only administrators can switch to another user. Lower level users cannot switch between accounts.
- User switching is protected with the WordPress nonce security system, meaning only those who are allowed to switch users can switch.
- Full support for administration over SSL (if applicable).
- Passwords are not (and cannot be) revealed.
Screenshots

The 'Switch To' link
If you’re using WordPress 2.8 you can also switch users right from the ‘Users’ screen:

The 'Switch To' link in WordPress 2.8
Installation
If you're installing this in WordPress MU as a mu-plugin then see the FAQ for slightly different instructions.
- Unzip the ZIP file and drop the folder straight into your 'wp-content/plugins' directory.
- Activate the plugin through the 'Plugins' menu.
- Visit the 'Users' menu and click 'edit' next to a user. From there you'll see a link to 'Switch To' that user.
For those using WordPress 2.8 or higher, you'll also see a 'Switch To' link right next to each user in the 'Users' menu.
Todo list
- A custom capability (eg. ’switch_users’) which can be granted to lower level users so they can switch accounts.
- Support for WordPress 2.5.x/2.6.x if the demand is there. Decided against this.
- Some way of switching back to the administrator account after switching to a lower level account (will require a cookie-based remembering system which doesn’t compromise security). Work in progress.
- A persistent notification in the admin area reminding you that this is an account you switched to and not your account (also reliant on solution above).
FAQ
Does this plugin work in WordPress MU?
Yes.
Does this plugin work as a mu-plugin in WordPress MU?
Yes, except you'll need to install the 'user-switching.php' file into the root of your mu-plugins directory, not in the 'user-switching' subdirectory. This is a current limitation of WordPress MU, not this plugin.
Download
This plugin requires WordPress version 2.7 or later, or WPMU version 2.7 or later.
Version 0.2.1 ZIP file from downloads.wordpress.org
Any comments, questions, queries, suggestions, complaints, etc, please leave a comment!

March 5th, 2009 at 7:29 am
Very handy indeed. I think I will make something with this and my “No Login” plugin for test sites.
And very clean code, too. Me likes.
March 11th, 2009 at 8:37 am
using wp 2.7.1 and in the edit profile palce, there is no switch user link as shown above in the screenshot :-( what could be wrong?
March 11th, 2009 at 8:38 am
sorry, my bad. found the link now :-(
March 12th, 2009 at 10:07 am
Thanks for the plugin BUT I defintely don’t have any “Switch To” link anywhere as explained above !! I am runing wp 2.7.1 and I installed the plugin through the Admin > Plugin Install panel with no errors !
What is going on ???
March 12th, 2009 at 10:21 am
AYN: Are you sure you’re logged in as an admin and you’re in the editing screen for a user? (You won’t see the link in the second screenshot unless you’re using a development version of WP 2.8). The link will be right under the option for enabling comment moderation keyboard shortcuts.
March 12th, 2009 at 2:03 pm
Hi John
Thanks for your quick reply.
I AM logged in as Admin and I am in the editing screen of my Admin profile and cannot see the switch link under the enabling keyboard ….. I wished I was missing it somewhere but unfortunately I am not ! … OKay I got it :
Sorry,….. I just found it. I was expecting to find the link on my Admin Edit profile page and from there to be able to choose wich user to switch to. I didn’t recognise how it actually works till luckily checked my Editor account and saw the link there. I clicked it and switched to my Editor account happily. I expected though that I would be able to switch back to my Admin account from there but it doesn’t seem available. I had to logout of the Editor account and then sign in again to my Admin account. Is that how it works ? Am I missing something here ?
Thanks again for the good work and your kind response.
Cheers
March 12th, 2009 at 2:09 pm
I should just correct/ answer myself to my previous question about switching back. Sorry that I was a hurried one. I understand after paying more attention to the description that ONLY Admins can switch accounts so: only if I am switching between diffrent Admin accounts I would be able to switch back without having to login. Correct me John please if I’m I got anything wrong here.
That feature may be handy if feasible though i.e. to make the plugin remember me in whatever account type I switched to and give me a link to switch back perhaps only to that account I came from. A good idea ?!
Best regards and thanks again
March 12th, 2009 at 7:33 pm
AYN: You’re right in that switching back is not currently possible, but it’s a planned feature as you can see in the ‘Todo list’ above. Thanks for your interest in my plugin!
March 16th, 2009 at 10:35 pm
OH thank you thank thank you. This will save a lot of headaches from utilizing 2 different computers and logging in and out of the same machine. Can’t wait to install! A very useful plugin for developers indeed.
All the best,
Jayson
http://twitter.com/askjayson
March 26th, 2009 at 4:48 am
Version 0.2 released, adding the ability to securely switch back to the administrator account you originally switched from. Good times.
April 1st, 2009 at 6:05 pm
Nice one bro!
Now I can switch back again I’d say this is a pretty invaluable plugin. No more sitting there with Firefox and (ugh) IE open at the same time…
June 8th, 2009 at 1:30 pm
What are the changes in the 0.2.1 ?
thanks
Federico
June 8th, 2009 at 1:32 pm
I need to know before the update….
June 8th, 2009 at 3:00 pm
Hi Federico. The only change in 0.2.1 is to prevent the “Switch back to…” message showing up when it shouldn’t. You do not need to update to this version if you don’t want to.
John.
July 18th, 2009 at 10:29 am
This plugin is simple and cool, i love it!!! Thanks for your efforts
July 21st, 2009 at 2:10 pm
Hi John
This plugin looks great but I woudl really like the follwoing functionality you have listed under your to do list here:
“A custom capability (eg. ’switch_users’) which can be granted to lower level users so they can switch accounts.”
Any ideas when you might do this?
I am currently trying to hack your code to implement this exact functionality on a WordPress MU / BuddyPress site so if you wanted to work toegether on this then drop me a mail.
July 23rd, 2009 at 1:53 am
Andy: I haven’t given much thought to the custom capability as I’ve not come across a need for it yet. Using a plugin such as Role Scoper or Role Manager I’m sure it would be easy to grant certain users a custom capability of ’switch_users’. It would then simply be a case of changing the references to ‘edit_user’ in the User Switching plugin to ’switch_users’.
Give me a shout if you have any problems and I’ll see about adding it natively to the plugin.
September 14th, 2009 at 6:57 pm
It would be cool if the plugin could play nice with Justin Tadlocks new capability plugin ( Members ).
Tadlocks Members plugin ( beta ) has a filter hook on the available caps (see functions-admin.php) if you want to integrate User Swithing specific capabilities.
http://justintadlock.com/archives/2009/09/07/beta-test-my-upcoming-user-role-and-content-management-plugin
http://justintadlock.com/downloads/members.zip
September 14th, 2009 at 11:56 pm
John: Thanks for the suggestion. The idea already crossed my mind when I read about Justin’s plugin. I’ve not had a chance to test it out yet.
The main reason I’ve not added the custom capability option to User Switching yet is that it requires a bit more thought. For example, if a lower level user has the ’switch_users’ capability, they would need a screen in the admin area from which they could switch users from, as only Administrators by default have access to the Users menu.
In addition, should these lower level users with the switch_users capability be allowed to switch to any other account regardless of its role? Or should, for example, an Editor only be allowed to switch to other Editor accounts and lower accounts?
I’ll give it a bit more thought and see what I come up with.
December 19th, 2009 at 11:20 pm
It doesn’t work with wordpress 2.9 i think, when switching to another use you get taken to the login page…
December 21st, 2009 at 3:07 pm
Thanks Patung, I’ll look into it.
December 26th, 2009 at 9:34 pm
I have found this plugin to be virtually indispensable for theme development, included this plugin in my article
January 28th, 2010 at 7:13 pm
Hey, I guess I never got around to thanking you the fantastic bit of functionality that this plugin offers.
I use it both on regular WP installs, as well as on MU setups and it works great.
Thanks again!