Skip to content

WP-CLI Magic Login

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

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.

Interested in working together?

I'm open to freelance engagements and consulting. Let's talk.