Giter VIP home page Giter VIP logo

magento2-lando-wsl2's Introduction

Local developement environment for Magento 2 based on Lando and WSL2 (Windows 10)

Requirements

๐Ÿ‘‰ Setup Lando - step by step

Here you will find the article on which this repo is based:

1. Install WSL 2 on Windows 10

Follow the official documentation to install and enable WSL 2.

2. Install Linux (Ubuntu or Debian) from the Microsoft Store

Then run it and create a Non-Root User (eg. 'jan'):

sudo adduser jan
sudo usermod -aG sudo jan
su -  jan

Set as default user on Linux start:

sudo nano /etc/wsl.conf

Create (if not exist) or edit this file:

[user]
default=jan

And save it.

3. Install Docker Desktop .exe on Windows

https://docs.docker.com/desktop/install/windows-install/

4. Install Lando inside your Linux distro (Ubuntu or Debian)

sudo apt install wget

Get url versions from github.com/lando/lando/releases:

wget https://github.com/lando/lando/releases/download/v3.20.8/lando-x64-v3.20.8.deb

sudo dpkg --ignore-depends=docker-ce --install lando-x64-v3.20.8.deb

After installing lando this way, you may need to edit the /var/lib/dpkg/status file:

sudo nano /var/lib/dpkg/status

Search (ctrl+w) for Lando and remove from dependencies: docker-ce

then save: ctrl+o

and exit: ctrl+x

5. Go to your Magento project and start Lando

cd ..
cd projects/magento-2.4.6/lando
lando start

๐Ÿ‘‰ Magento 2.4.6 installation

Write your public and private access keys from Magento Marketplace into config/env file and state if you need Magento Sample Data by setting DEPLOY_SAMPLE_DATA to true or false.

To install clean Magento 2.4.6 instance run install.sh script

bash ./install.sh

Magento 2 will be installed in the www directory. After installation store will be available at https://magento246.lndo.site and admin panel at https://magento246.lndo.site/admin with user:
name: admin
password: admin123

PhpMyAdmin will be available at http://phpmyadmin.lndo.site
user: magento
password: magento

For Magento 2 console commands use:

lando bin/magento <command>

for example:

lando bin/magento cache:flush

๐Ÿ‘‰ Commands

  • Start / build lando
lando start
  • Stop lando
lando stop
  • Rebuild lando app
lando rebuild
  • Destroy app (containers, databse, NOT FILES!)
lando destroy
  • Import database (supports .sql and sql.gz files)
lando db-import path/to/file.sql
  • Export database
lando db-export path/to/file.sql
  • Connect to container's shell
lando ssh
  • Run command in container's shell (you have to be in docroot directory)
lando ssh -c <command>
  • Enable Xdebug
lando xdebug-on
  • Disable Xdebug
lando xdebug-off
  • Node command
lando node <command>
  • NPM command
lando npm <command>
  • Grunt command
lando grunt <command>
  • Gulp command
lando gulp <command>
  • n98-magerun2 command (after instalation via lando composer require n98/magerun2-dist)
lando n98-magerun2 <command>

โญ See also Azkarra - my Magento 2 theme optimized for Core Web Vitals and PageSpeed score!

๐Ÿ‘‰ More info nad DEMO: https://github.com/dev-jq/Azkarra-Magento2-Theme-for-Core-Web-Vitals-and-PageSpeed

magento2-lando-wsl2's People

Contributors

dev-jq avatar

Stargazers

Musab Atas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.