How to install Laravel on windows using XAMPP (Step by Step)

Launched in June 2011, Laravel is one of the most popular open-source PHP framework till now. Laravel is developed by Taylor Otwell and follow MVC (Model-View-Controller) design pattern. Purpose of laravel is to bring more advanced alternative to the Codeigniter framework, which did not provide certain features like user authentication and authorization.

I am not going to cover laravel features in this post. I will do that in my upcoming tutorials. In this tutorial I am just going to cover step by step laravel installation on windows using XAMPP.

Laravel Version and Requirements:

At the time of writing this post stable version of laravel is 8 and it has following requirement to run on server.

  • PHP >= 7.3.0
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension
  • Ctype PHP Extension
  • JSON PHP Extension


Dont worry about above requirements, your XAMPP has all the above extension by default. If just in case you don’t have xampp on your windows machine then read my post.


Another thing which is must for laravel installation is “Composer”. If you don’t know what is composer then in simple word “Composer is a tool for dependency management in PHP”. For more details and composer installation read my post.

Steps: Laravel installation on windows using XAMPP

Now you have both XAMPP and Composer on your windows machine. Lets install laravel by follow below points.

  1. Open XAMPP control panel and click on Shell. Then terminal will open with a cursor in XAMPP folder. Screenshot step 1
  2. Type Composer and press enter just to check composer is working fine. Screenshot step 2
  3. Type cd htdocs to go in htdocs folder. Screenshot step 3
  4. Now Type composer create-project --prefer-dist laravel/laravel my_site. composer create-project --prefer-dist is a composer command, laravel/laravel is a repository and my_site is folder name that create on run time and laravel install in it. Screenshot step 4
  5. Laravel installation will take some time Screenshot step 5
  6. After installation type cd my_site and then type php artisan serve Screenshot step 6
  7. After typing php artisan serve. Laravel serve will start and show message like “Laravel development server started: “. Don’t worry if you get different http address. Screenshot step 7
  8. Just copy and hit in the browser. Screenshot step 8
  9. Congratulation! You have successfully installed laravel on windows using xampp.

For you convenience I am attaching screenshot of each step.

Step 1:

open xampp control panel

open xampp shell

Step 2:

check composer installation

Step 3:

goto htdocs folder

Step 4:

insert composer command to download laravel

Step 5:

laravel download begins

laravel installation complete

Step 6:

laravel my_site folder

goto my_site folder

Step 7:

type php artisan serve command

Step 8:

laravel installation successful

If you find any problem during installation feel free to comment on this post. I will try my best to answer your comment as soon as I can.

Also Read:


One Reply to “How to install Laravel on windows using XAMPP (Step by Step)”

Leave a Reply

Your email address will not be published. Required fields are marked *