One of the big pains of web development and systems administration is the need to see every project from approximately one million different perspectives. You need to see how a site looks in different resolutions and on different devices. You have to keep multiple browsers open, lots of incognito windows, and probably more than a couple monitors on hand for testing. There’s also a good chance you are using this set up with multiple user accounts to make sure all your content and permissions are set up correctly.
Doing all this is terribly inefficient. You’re wasting time and resources doing it this way. You can at least make your life a little easier with a simple plugin for WordPress user switching, helpfully titled User Switching.
WordPress User Switching
Without a plugin like this, seeing a site as multiple users is done in two ways.
- logging in and out the good old-fashioned way to swap between accounts
- keeping multiple browsers and private tabs open with different users logged into each
Neither of these is ideal. After all, if you have more than a couple accounts, logging in and out involves oodles of typing and retyping usernames and passwords (or selecting from your password manager’s list). Which wastes a ton of time and energy over the course of the project. And keeping multiple tabs and browsers open is suboptimal because while you only have to log in once for each account, you have to keep track of which browser has which user. Speaking from experience, a lot of these user views can look so similar, it’s easy to make a mistake as to which one you’re looking at.
So you definitely want to do some WordPress user switching. It may not solve all your resolution and device-testing problems, but it absolutely clears up enough time for you to focus on them. You’re not going to be searching through spreadsheets, password managers, or Post-It notes anymore.
Additionally, it’s a great way to help manage different projects you may be using WordPress for, such as a multisite installation or social community or forum using BuddyPress or bbPress. The plugin is just fine for those, too. Again, speaking from experience, keeping users and permissions straight across multisite networks and forum accounts can be kind of a slog. Using a plugin like this one makes a big difference to your quality of life.
A Note on Passwords
All this is done without having the need for any passwords except for the administrator or super administrator of multisite networks. User Switching is limited to those user roles (or anyone with the edit_users tag), so don’t worry about your Editors, Subscribers, or Keymasters being able to rum amok. They can’t do that.
And they can’t steal anyone’s password, either. The plugin uses WP authentication to swap you over, so you don’t need to enter the user’s password. And you can’t get access to it, either. It’s safe as can be. You can reset the password of the account, though. But that’s a feature that admins and super admins already have.
Download and Install
I’m sure you’ve done this before. Find User Switching in the WordPress.org plugin repo, download it, install it, and activate it. Initially, you won’t see a lot of difference. Or really, any difference. You need to go into your user list to see what’s going on. Head to Users -> All Users in your WP admin dashboard.
Using User Switching
Things will look unchanged until you hover over a user. I am logged in right now as an Administrator, and one of the user roles I have is called Board Member. To see the back-end and front-end of the site as that role (which comes from this plugin, by the way), just click on Switch To.
You will be immediately taken into the dashboard for that user. (And if you did it as a mistake, just click on the Switch back to link, and you’re good.) Note that the left-hand menu is completely bereft of anything else. Because the Board Member role doesn’t have access to anything in the back-end other than their own profile. And when you go into any of the pages as the user you switched to, the banner remains at the top for you to switch back to the original. No need to navigate to the Users page again (especially since some roles don’t have access to those).
Upon doing so, things go back to normal, and the profile gets put back in the admin’s hands.
Switch Off vs Log Off
When doing all this switching and swapping, it’s good to know about the Switch Off feature. In the upper-right corner, in the profile hover menu, you have Switch Off added just under Log Out. When you hit Log Out, you log out of the current user. It’s the same as always. However, when you hit Switch Off, you are essentially logged in as no one. You can check the site out as a typical user, then click right back in to keep the workflow going. Again, it’s a solution to not needing to keep so many different versions of the page open at any given time.
An Elegant Solution to a Common Problem
So whether you run a membership site and want to make sure your content drip is working right, or run a social network for expatriated otaku and need to make sure your premium avatars are working, or even a forum for people to discuss what it’s like to start learning PHP in 2018 and want to see why someone’s code isn’t rendering, User Switching is likely going to be a solution for you. Being able to swap between users at a click is an incredibly nice, quality-of-life feature that you’ll certainly get used to having around. Sure, it’s not a flashy plugin, but it just works. It does what it says it will do. And that goes a long way.
Do you see a use for a WordPress user switching plugin in your workflow?
Article featured image by elenabsl / shutterstock.com