Monday, 3 July 2017

How to setup Laravel on Windows

Laravel is one of the most popular PHP frameworks today.Laravel is free, open source PHP web framework created by Taylor Otwell and intended for the developement of web applications following the model-view-controller(MVC) architectural pattern.

Let's see the step by step process for installing Laravel on your windows.Here I am going to provide you easy steps to setup Laravel on your windows so make sure you follow all the steps and install it correctly.If you stuck anywhere in between then do let me know.

Steps to setup Laravel on Windows:

1) First step is that you should have latest server with you, if you don't have then first install local server on your Computer/PC/Laptop.You can download any server you want like WAMP or XAMPP.I would prefer XAMPP.You can download it here - Download XAMPP

There are four server available:

WAMP - For Windows (Windows Apache MySQL PHP)
LAMP - For Linux (Linux Apache MySQL PHP)
MAMP - For Mac (Mac Apache MySQL PHP)
XAMPP - For all (x-OS Apache MySQL PHP Perl) 

2) After downloading XAMPP, you can run your any file in that.But for that you have to put your files in C:\xampp\htdocs. Now to setup Laravel on Windows you have to first download Composer.You can get it here - Download Composer

3) go to C:\xampp\htdocs or any directory/folder inside that where you want to create your laravel project, press (shift + right click) and choose "open command window here" and after that just write composer and hit "Enter".If you see below screen then you have downloaded composer correctly.


4) Now in command window, write below command to start new Laravel project in your current directory(folder).Here enter your project name in place of "your-project-name" in below line.Before you install Laravel, you need to make sure that your server meets the following requirements.Below requirements are for "Laravel 5.4".If you want to use different Laravel version then requirements will be different.You can check it out here - Laravel Documentation . To see the requirements, choose any version in top right corner.

Server Requirements for Laravel 5.4:-

  • PHP>=5.6.4
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

Command to download latest Laravel version:

composer create-project --prefer-dist laravel/laravel your-project-name

Command to download specific Laravel version(e.g. 5.3):

composer create-project --prefer-dist laravel/laravel your-project-name "5.3.*"


Wait while the installation completes.

5) now open XAMPP Control Panel and start Apache and MySQL in it.Now go to below path to see your "myapp" running.It will be in your XAMPP/htdocs/myapp folder.In that folder click on public to open below page.



Now you are done with setup of Laravel on Windows.You have created your first Laravel project.I hope these steps helped you to setup your Laravel Project easily on Windows.

How to setup Laravel on Windows Video Tutorial:

Previous Post

post written by: Dhaval Thakkar

Dhaval Thakkar is an enthusiastic web developer who is passionate about learning new things and always ready to help other developers.Just Web Code is a way to provide web solutions to web developers.


  1. Hi Dhaval,
    I have install laravel but comming error

    Bellow error

    C:\xampp\htdocs>composer create-project laravel/laravel vishnu
    The '
    292ef776dead11787c825703dc0f.json' URL could not be accessed: HTTP/1.1 400 Bad R
    equest could not be fully loaded, package information was loaded f
    rom the local cache and may be out of date

    The '
    970000547e7ad2e4dfb7e61c9d761a4f489.json' URL could not be accessed: HTTP/1
    .1 400 Bad Request

    create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--r
    epository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no
    -custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vc
    s] [--no-install] [--ignore-platform-reqs] [--] [] [] []

    plaese solve this error

    1. try to clear your cache and then update your composer

  2. Can you please tell me how to upload laravel project on server