CLI Command

You can use WP-CLI to generate a magic link URL for any existing user:

magic-login create <user> [--count=<count>]

for example if you want to create a 2 login links for the admin user

wp magic-login create admin --count=2

and output will be something like


In version 1.3.1, `redirect-to` parameter has been added! You can easily specify the redirection URLs.


wp magic-login create admin --count=1 --redirect-to=''

PS: The login links generated via CLI will skip the IP Check even if you have enabled that option.