Using “One-click admin”
The “Admin” button in Local is one of the most clicked buttons because of how often we’re managing our WordPress sites.
If you aren’t logged into the WordPress site, then accessing the admin will prompt you for your username and password.
But you’re a busy dev, and likely are pulling down various client sites with different admin passwords. Those domains probably don’t align with your password manager.
And you just want to get on with development.
Enter, “One-click admin”
Using the “One-click admin” option allows you to streamline the process of logging into any site managed by Local.
Simply select the admin user you want to log in as and click the “Admin” button to navigate directly to the WordPress admin.
No more opening your password manager, resetting passwords using WP-CLI, or resetting passwords using the Lost Password workflow!
“One-click admin” doesn’t only have to be used to quickly access the WordPress admin.
While testing functionality, you can quickly switch between multiple admin accounts by simply selecting a different user from the dropdown menu.
What happens when I disable “One-click admin?”
With “One-click admin” disabled, Local will no longer automatically log you in when clicking the “Admin” button.
Local won’t do anything to log out of existing sessions, which means if you need to logout, you can do so from within the WordPress admin.
Will One-click admin work over Live Links?
Nope. Due to security concerns, “One-click admin” only works when working on the site directly on your local machine.
Will One-click admin work after pushing my site to a remote environment?
Nope. “One-click admin” only works for sites that Local is directly managing.
Local performs this magic by leveraging a PHP configuration option called
auto_prepend_file, which only runs within the Local site’s environment.
This “One-click admin” won’t work on remote environments, but you can always pull a site down and use “One-click admin” to log into the local site.