Blog

  • How to install Laravel in WSL2: Get your own

    Step-by-step guide on how to install and configure Laravel application in WSL2: Install WSL2: Follow Microsoft’s official documentation to install WSL2 on your Windows machine. You can find the documentation here: https://docs.microsoft.com/en-us/windows/wsl/install-win10 Install PHP: Laravel requires PHP to be installed on your system. You can install PHP by running the following command in your terminal:

    sudo apt-get update
    sudo apt-get install php php-cli php-common php-mbstring php-xml php-zip

    Install Composer: Composer is a package manager for PHP, and it’s required to install Laravel dependencies. You can install Composer by running the following command:

    sudo apt-get install composer

    Install Laravel: Once you have installed PHP and Composer, you can install Laravel by running the following command:

    composer global require laravel/installer

    Create a new Laravel project: You can create a new Laravel project by running the following command:

    laravel new myproject

    This will create a new Laravel project named myproject in the current directory. Start the development server: To start the development server, navigate to your project directory and run the following command:

    php artisan serve

    This will start the development server at http://localhost:8000. That’s it! You have successfully installed and configured a Laravel application in WSL2. You can now start building your application using Laravel.

Share via
Copy link