How to auto login wordpress | How to login wordpress admin without password

In this article, I will show you how you can set up automatic login to a specific user. This way you can access to any username exist in your WordPress site. Suppose you are trying to access to a user and that’s

username is ‘admin’. Now just place this codes in your theme’s functions.php

Then go to your browser and open your website and reload it. Yes ! You are now logged in as admin.

If you want to access to another username then just change the variable $user_login to your desired username.

Remember !

This is a Terrible thing as all your visitor will get access to your admin dashboard. Do this only for testing purpose. You can restrict it by sending some value through the URL and retrieve those as $_GET[] method to prevent getting access by all visitors.