You install User Switching to test accounts. You click “Switch to User.” You get logged out instead. You are now on login page. That is frustrating because you cannot test other accounts.
A common issue is that your caching plugin or security plugin blocks the switching cookie. User Switching sets a temporary cookie. If cookie is blocked, switching fails. The plugin is not broken. Another plugin is interfering.
Why User Switching Fails
User Switching works by setting a secure cookie that tells WordPress you are switching between accounts. When you click “Switch to User,” plugin sets cookie and redirects. If cookie is blocked (by cache, security, or browser settings), WordPress does not recognize the switch. You get logged out.
This is not User Switching being bad. Cookie blockers are the problem.
The Most Common Switching Failures
- Security plugin blocks user switching cookies
- Cache plugin serves cached login page
- Browser blocks third-party cookies
- Site uses Cloudflare with cookie-less domain
- Session handler conflict with another plugin
Check these first.
How to Fix User Switching Logouts
- Temporarily disable security plugins (Wordfence, Sucuri, Cerber)
- Test user switching
- If works, whitelist user switching cookie in security plugin
- Disable cache for admin pages
- Clear all cache and test again
- Test in incognito browser window
Finding which plugin blocks cookie is the fix.
How to Whitelist User Switching in Wordfence
Go to Wordfence → All Options → Advanced Firewall → Whitelisted URLs. Add /wp-admin/ and /wp-login.php with parameters. Also add “wordpress_user_sw_” cookie to whitelist. Save. Test switching.
Contact security plugin support for exact cookie names.
Alternative: Use Different Browser for Testing
Instead of switching accounts, open incognito window. Log in as test user. Use another browser for admin. This avoids switching entirely. No plugin needed.
Manual method is slower but always works.
People Also Ask About User Switching Problems
Why does User Switching log me out instead of switching?
Cookie blocked by security or cache plugin. Whitelist the cookie.
Should I delete User Switching?
No. Fix cookie blocking. Or use manual method (incognito window).
Is User Switching worse than WP User Switch?
Both use same cookie method. Same issues. Whitelist the cookie.
Final Thoughts
If User Switching logs you out, check security and cache plugins. Whitelist user switching cookie. Test in incognito window. Your switching will work again.