Skip to content
WP-CLI command to generate one-time passwordless login links for any WordPress user — handy for support and deployment w...

2022 · Creator

WP-CLI Magic Login

WP-CLI command to generate one-time passwordless login links for any WordPress user — handy for support and deployment workflows.

The challenge

Debugging customer or staging WP issues means sharing credentials or creating throwaway admin accounts. Either leaks creds or leaves orphaned accounts behind.

The result

A WP-CLI command that mints one-time, time-boxed passwordless login URLs for any user. No credential sharing, automatic expiry, audit log entry per use.

Year
2022
Role
Creator
Stack
3 teches
Status
Published

Overview

Adds a wp magic-login generate <user> WP-CLI command that creates a time-limited, single-use login URL for any user. No plugins installed on the target site beyond the package itself.

Use Cases

  • Customer support: log in as a user to reproduce a bug without asking for credentials
  • Deployment scripts: automatically log in after a migration
  • QA: quickly switch between test accounts

Security

Tokens are stored hashed, expire after 15 minutes, and are invalidated after first use.

Share
𝕏 in

Related work

Building something similar?

Let's talk about your project.

Open to freelance engagements and consulting on Laravel, WordPress, and AI-powered systems.