One-click admin

“One-click admin” allows you to log in to your site’s “WP-Admin” with just one click! Simply toggle the option to get started.

The “WP-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 clicking the “WP-Admin” button 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.

Set up One-click admin

Using “One-click admin”allows you to streamline the process of logging into any site managed by Local.

After toggling on the “One-click admin” feature, select the admin user you want to log in as, and click the “WP-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!

Local's One-click admin feature is currently turned off on the site Brunner's Bakery.
Local's one-click admin feature is turned on with an admin selected on the site Brunner's Bakery. This means when you will automatically be logged into this admin when you click the WP-Admin button.

note

Switching Users

While testing functionality, you can quickly switch between multiple admin accounts by selecting a different user from the dropdown menu.

Any admin added through the users tab in the “WP-Admin” will automatically appear in the dropdown menu.

Disable One-click admin

You can disable “One-click admin” by clicking the on/off toggle. With “One-click admin” disabled, Local will no longer automatically log you in when clicking the “WP-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.

Due to security concerns, “One-click admin” only works when working on the site directly on your local machine. This means that “One-click admin” will not work with Live Links.

One-click admin functionality

“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.

note

If you are still being prompted to log in to the “WP-Admin” after toggling on “One-click admin” and you are using Site Domains for your Router Mode then we suggest switching from that to localhost. Another option is to do a search and replace for https > http.