Local sites need logins too — and resetting them is a waste of time. Every WP Staging CLI site can issue a magic link: a one-time URL that signs a chosen user straight into wp-admin. No passwords, no lost reset mails, nothing that survives the session.
Create a Login Link
wpstaging magic-link mysite.localThe command prints a URL. Open it in your browser and you are logged in. The link is single-use and expires on its own — the default lifetime is 15 minutes, and you can set your own:
wpstaging magic-link mysite.local --timeout=60Open a Specific Admin Page
By default the link opens the dashboard. Send it to any wp-admin page instead:
wpstaging magic-link mysite.local --redirect='admin.php?page=wpstg_backup'Get a Fresh Link From the Site List
wpstaging list refreshes a login URL for every site it shows, so you never dig for old links. In scripts and dashboards, read the link from the JSON output:
wpstaging list --jsonTurn Magic Link Off or On
Some workflows should not have passwordless entry points — restoring a client backup is one of them. Switch it off when you create or reconfigure the site, and back on when you want it again:
wpstaging add client.local --from=./client.wpstg --disable-magic-link
wpstaging reconfigure client.local --disable-magic-link=falseHow It Stays Safe
- Each link works once and then stops working.
- Links expire — the default is 15 minutes.
- The URLs point at your local machine, not at a public host.
Next Steps
- Manage Docker WordPress Sites – manage the site list
- Automate WP Staging CLI With JSON Output – machine-readable output for scripts