How To Use the User Switching Plugin in WordPress
If you run a WordPress website with many users, you probably often have to answer questions or solve bugs for your users.
Here at PublishPress, we rely heavily on the User Switching plugin. This allows us to browse our site and see exactly what the user sees. User Switching is enormously helpful when we're solving support questions.
We can test the user's account without needing to reset their password or create a duplicate version of their account.
In this tutorial, I'll show you how to use the User Switching plugin.
Step #1. Install the User Switching Plugin
- Click Plugins > Add new.
- Type “user switching” in the search box.
- Click Install Now.
- Click Activate.
Step #2. Create Users
For the purpose of this tutorial, we will create one user in each WordPress role. In addition to “Administrator”, there are four more user roles:
- What permissions do Subscribers have in WordPress?
- What permissions do Contributors have in WordPress?
- What permissions do Authors have in WordPress?
- What permissions do Editors have in WordPress?
Let's add one example
- Click Users > Add New.
- Add a user in the “Editor” role.
- Click “Add New User”.
- Repeat this process for other WordPress roles.
At the end of this process, your screen should look like the image below.
Step #3. Test Users with the User Switching plugin
Now that you have user accounts, you can test the User Switching plugin.
- Hover your cursor over the user with the Editor role.
- Click Switch To.
The first thing you will notice is that the dashboard has changed. An Editor is not allowed to switch themes or install plugins, for example. They are not allowed to access the Users screen.
It is possible to switch back to the admin user, by clicking the link below the title. There is a similar link under the profile picture on the top right of the screen.
Now that you've tested the Editor role, it's time to test more roles.
- Switch between other user roles.
For example, try creating content as Contributor. You will see a “Submit for Review” button instead of “Publish” (read about the difference between Draft and Pending Review). This is because Contributors are allowed to create but not publish content.
The Contributor role is not allowed to manage Tags or Categories so you won't see those menu links. You also won't be able to see content written by other users.
- Switch to the Editor role.
Take a look at the “Posts” screen again. You will notice that you are allowed to check and even edit the Contributor posts. The Editor role is far more powerful in WordPress than the Contributor role.
You can integrate the User Switching Plugin with the PublishPress Capabilities plugin to create more complex user and permission workflows and gain valuable time during the development process of your site.
We find the User Switching plugin to be an enormously helpful tool. If any PublishPress user has questions, we can see this site through their eyes. This enables us to quickly find problems that might not be obvious to us as administrators.