THIS HAS BEEN MOVED TO improper/lando-magento2-template.
THIS GIST IS NO LONGER SUPPORTED
- This setup expects Lando to be installed and ready to go on your machine
- This setup expects Magento's stock
nginx.conf.sample
to exist in Magento's project root. Of course you can modify this file as needed moving forward. - You may experience performance gains by adding Redis, Elasticsearch, etc.. These services can easily be added following Lando's documentation.
- Add this Gist's
.lando.yml
to an empty directory - Run
lando magento:download
- Add your Magento credentials to auth.json
- Copy config to
lando.nginx.conf
- Launch your new store and deploy the database:
lando start && lando composer install && lando magento:setup:quick && lando magento cache:flush
- Optionally, you can pass the
----use-sample-data
to the thelando magento:setup:quick
command shown in this step.
- Optionally, you can pass the
That's it! You will then be able to access your Magento store at https://magento2.lndo.site/
HINT: Run
lando
to see available shortcuts such aslando magento
!
lando magento:setup:quick
is an alias for lando magento setup:install
and is pre-configured to setup the database connection.
- Defaults to developer mode.
- See
lando magento:setup:quick --help
for additional configuration options. - For the sake of shortcuts,
lando magento:setup:destroy
is also available.
If you did not pass additional arguments to lando magento:setup:quick
, you will probably want to know your admin URI and to create an admin user.
- Fetch Admin URI:
lando magento info:adminuri
- Create admin user:
lando magento admin:user:create
@rhuffstedtler - I have updated the gist.
.lando.yml
has been made compatible with the latest version of Lando.lando.nginx.conf
has been updated so that it is compatible with the latest version of Lando.lando magento:download
commandlando.nginx.conf
file (you will still have to paste the content from this Gist for now into the file)I've tested this a couple of times today and it seems fairly stable. Within 3 or 4 steps you should have a functional empty Luma site up and running. However, you can pass the
--use-sample-data
to thelando magento:setup:quick
command to include the sample data while also configuring the DB to work with Lando.lando magento:setup:quick
is actually an alias forbin/magento setup:install
(with a few default arguments for Lando) so you can actually pass anybin/magento setup:install
argument or option to this command.I'm going to go out on a limb and say this should now be one of the easiest ways to get up and running on Magento.
I recommend running
lando destroy -y
before following the steps in the readme.Lastly, this Lando config will work with any existing code base that you may already have. You'll just want to consider removing the setup/download commands and renaming the Lando app and proxy URL.