Reputation: 103
I'm new to Lando, and am surprised at the way it works. I'm following the example at https://docs.lando.dev/wordpress/getting-started.html, and got a WP site up and running.
But I've been reading docs and trying a few things, and can't find a way to avoid having to manually run the lando init function.
I would have thought that having a lando.yml file saying the recipe is wordpress would be enough to get you up and running - my idea being that I could take that same YAML file, modify a few variables like the app URL, and run "lando start" or something to have lando recreate the entire site.
Is there a way to do this?
Andy
Upvotes: 0
Views: 690
Reputation: 36
You can in fact do exactly this, you don't need to run lando init on a project unless you want to use the included wizard to fill out the .lando.yml
file. You can simply do the following to run a WordPress site:
name: awesome-wp-project
recipe: wordpress
place that in the .lando.yml
in the root of your project and then run lando start
. You'll have a new instance of Lando with the default configuration for the WordPress recipe running. The important thing to note is that each project needs to have a unique name and should run from a different folder (not nested inside eachother).
You can then include the same customizations in multiple projects (like adding a node container to compile theme assets, or using a specific version of PHP, config file, or folder structure). Just make sure to name each application uniquely.
Upvotes: 1