To install Laravel on Windows, follow these detailed steps

Install XAMPP

Download xampp to your pc from here.

After finishing download

Run the installer and follow the on-screen instructions. During the installation process, you can choose which components to install. Make sure to select PHP and MySQL.

After Installation complete start apache & mysql server

Install Composer

Composer is a dependency management tool for PHP that is most import tool to install Laravel into our windows computer

Go the Composer download and download Composer-Setup.exe file that show in below sceenshot.

After Download it run that file. while you installing composer you’ll also be asked to select the install mode. Be sure to select Install for all users.

Make sure to select the correct PHP executable (php.exe) during the installation process (in my case C:/xampp/php/php.exe).

Verify installation

You can verify composer installation by below command in any command terminal

composer --version

If the installation was successful, you can see the composer version.

Install Laravel

we will use composer to install our first project in computer by using below command in terminal (i use git bash)

composer create-project laravel/laravel my-first-app
install laravel

This will automatically download all the relevant Laravel files to create a new project. in ./my-first-app folder

For run this project use below commands

cd my-first-app
php artisan serve

This command result will show like below

Congratulation 🎉 we create our first laravel application in windows computer let’s see output

Open Browser and go to 127.0.0.1:8000

Categorized in:

Laravel, Dev Tool,

Last Update: July 27, 2024