I created this plugin to use while working locally on my projects. Not that it’s a big deal, but I find it annoying to have to log into my local development sites. The WP Auto Login plugin adds a setting to the General settings page. To use the plugin, you do the following:
- Enter a username and password for any registered account on your local site. For my local projects, I have an administrator account with “admin” as the username and password. Therefore, I’d enter “admin” and “admin”. This is horrible practice for production environments (never do it…EVER) but it doesn’t matter for local installations.
- Navigate to your local site’s /wp-admin/?wp_auto_login=true. Appending the
wp_auto_login
query argument is what allows the plugin to log you in. For example,http://localhost:8888/test-site/wp-admin/?wp_auto_login=true
That’s all there is to the plugin. Once you set it up and visit the appropriate URL, you’ll be automatically logged in, without having to touch the login form.
Again, do not use this plugin on live WordPress websites. Doing so will allow anyone to sign in using the username and password you set. This plugin is only for lazy, local development.
Matteo Raggi says
this is great! less useful if I need to use it when I am already kicked out from the login form of wordpress. Is there a version of the plugin that permit to use it withotu wait to activate it? Bacue if I can’t login into the wp-admin area, then it is not very quick and easy to activate it trough database..
Plus this plugin is older of 2 years ago. is it working on wp 4.7.3 ?
Ryan Briscall says
Yeah Matteo, I have no idea what the reason was for having the “wp_auto_login” URL requirement to use this plug-in. That kind of defeats the purpose of the plug-in.
You can remove it by hacking the class-wp-auto-login-set-current-user.php file and removing this line:
if ( ! isset( $_GET[‘wp_auto_login’] ) || $_GET[‘wp_auto_login’] !== ‘true’ ) return;