aaemnnosttv / wp-cli-login-command

Log in to WordPress with secure passwordless magic links.
https://aaemnnost.tv/wp-cli-commands/login/
MIT License
292 stars 47 forks source link

Allow for multi-site #49

Closed michael-sumner closed 2 years ago

michael-sumner commented 2 years ago

Hello,

At the moment it does not allow for multisite capability, and only determines based on the primary site.

Can it be possible to implement multisite capability in the next release?

Kind regards, Michael

aaemnnosttv commented 2 years ago

Hi Michael, have you tried using the command with the --url= flag specifying the URL of the subsite you wish to generate a login for? See https://make.wordpress.org/cli/handbook/references/config/#global-parameters

michael-sumner commented 2 years ago

Yes I have, but didn't work. What seemed to work is to set the wp-config.php DOMAIN_CURRENT_SITE constant to a particular site I want to use the login for, and continue doing so for the other sites in the same network.

This issue can be closed, or if you want to look into it further happy to do so.

aaemnnosttv commented 2 years ago

I tried to reproduce this with both subdirectory and subdomain multisite installs but was unable to (it worked in both cases). What version of the command do you have installed?

michael-sumner commented 2 years ago

Thanks for replicating. It would have been the latest one. Would you still have the commands of the replication, and I can see where it could have gone wrong?