Closed matpratta closed 2 years ago
Okay, I think there's two issues going on here.
First, the CLI would not be installed before I properly ran lando rebuild
, this is the same I had with the Laravel recipe, seems like Lando is not initializing anything after running lando init
Second, more odd, bug: the recipes are being cached by Lando and not being fetched from the current directory. So what happens is, if I was working in a directory A with Laravel and switch to directory B with WordPress, Lando will not pick this change and will still behave as if it was working with Laravel, requiring me to run lando rebuild
to pick up the change. Now if I go back to directory A it will still see as WordPress from directory B.
You probably need to run lando start
also to get everything running. lando init
just sets the parameters. For more, see for example https://docs.lando.dev/wordpress/getting-started.html#quick-start
Seems like its an issue with your machine. Could be confusion with the containers or a name space collision.
I would try purging everything and starting over. https://docs.lando.dev/help/purging-containers.html
But isn't the real problem that they both share the same name my-lando-app
and that lando start
isn't run?
@gitressa @labboy0276 yeah seems like the Lando CLI has some sort of cache where it will store what recipe it last used based on the project name (good catch there!). Running lando start
or lando rebuild
seems to update this cache and things work just fine, just found it a bit odd when trying to figure out what I did wrong lol
Anyways, I ended up opening an Issue regarding this on the CLI repo earlier, I think it belongs there so I'm closing this one...
Thanks for the help!
Great that you got it working @MatheusMK3! Normally lando init
is followed immediately by lando start
(see for example https://docs.lando.dev/wordpress/getting-started.html#quick-start) since all init
does is create the .lando
config file, but doesn't start Lando.
I sometimes forget to start a Lando instance myself, so I usually create them with this one-liner, to make sure I don't forget it:
$ lando init --recipe drupal9 --name drupal9 --source cwd --webroot web && lando start
Lando Version: v3.6.5
Noticed that bug while writing a getting started guide to Lando, if you take a WordPress recipe (freshly initialized via
lando init
) and try runninglando wp
it won't work, but show a list of commands that belong to the Laravel plugin instead:The contents of my Landofile seem to be correct, too: