---
title: Enable WordPress Dashboard Quick Login
date: 2012-02-26T19:30:00+00:00
modified: 2024-08-01T07:51:53+00:00
permalink: https://kaspars.net/blog/wordpress-dashboard-quick-login
post_type: post
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
post_tag:
  - How to
  - Javascript
  - Snippet
category:
  - WordPress
---

# Enable WordPress Dashboard Quick Login

All of the web browsers today have input autocomplete or auto-fill feature built-in and chances are that you have your WordPress username and password stored in the browser and the input fields are completed automatically upon visiting `/wp-login.php`. Wouldn’t it be nice if WordPress would log you in **automatically** if the fields have been pre-filled by the browser?

Here is a simple snippet of PHP and Javascript that checks if the input fields have been filled and submits the login form one second after the page has been loaded. All you have to do is append `#quicklogin` to your login bookmark URL so that it looks like `http://example.com/wp-admin/#quicklogin` and Javascript will do its magic. Add this to your `functions.php`.

```
add_action('login_footer', 'enable_admin_quick_login');<br></br><br></br>function enable_admin_quick_login() {<br></br>?><br></br>	<script type="text/javascript"><br></br>		if (window.location.hash.indexOf('quicklogin') != -1) {<br></br>			setTimeout(function() {<br></br>				if (document.loginform.user_login.value && document.loginform.user_pass.value) {<br></br>					document.loginform.submit();<br></br>				}<br></br>			}, 1000);<br></br>		}<br></br>	</script><br></br><?php<br></br>}
```