How to Install Laravel on Windows

What is Laravel?

Laravel is an open source PHP framework designed to make web applications easier and faster through built-in features. These features are part of what makes Laravel widely used by web developers:

  • Modular packaging system with dependency management. This means you can easily add functionality to your Laravel application without having to write it from scratch. You can create your own packages for code you use regularly or install ready-made packages through Composer.
  • Full authentication system
  • Object-Relational mapping. The ORM included with Laravel presents database tables as classes for easy data access and manipulation.
  • Command Line Interface (CLI) that comes with dozens of pre-built commands (Artisan).
  • Automated testing. Automated tests are provided as an integral part of Laravel.
  • A portable virtual development environment. Homestead provides developers with all the necessary tools to develop Laravel right out of the box.

How to Install Laravel on Windows


Before you follow the guide on how to install Laravel on Windows, there are a few things you need to prepare and install first to support the installation of Laravel on Windows. These supporting applications are: 


  • XAMPP application (Download Xampp)
  • Composer (Download Composer)

After you download the 2 applications, please install them first starting from installing XAMPP.


If you have installed XAMPP and also Composer, then now you can install Laravel on Windows.


How to install Laravel on Windows consists of several steps, namely:

  1. Enter Command Prompt or CMD
  2. Enter the XAMPP folder (C:\xampp)
  3. Start Installing Laravel
  4. Check the Laravel Framework Installation in the Browser

Please refer to the following steps.

1. Enter Command Prompt (CMD)

The first step you have to do is enter the Command Prompt or CMD first. The trick is to click on the Win + R keyboard. Enter the word CMD then click OK.




2. Enter the XAMPP Folder

After that, direct your CMD or terminal to be in the file server directory.  The location of the file server in XAMPP itself by default is in xampp/htdocs. You only need to enter the command below to enter the htdocs directory.

cd \xampp\htdocs



3. Start Installing Laravel

If you are already in the htdocs directory, you need to fetch and install the Laravel files in the Github repository. Enter this command in your terminal:

composer create-project --prefer-dist laravel/laravel nama_projectmu



If you have entered the code and click Enter, then Composer will start the process of retrieving Laravel data and also install Laravel into the directory that you specified earlier, namely htdocs. To avoid errors or interruptions during the Laravel data retrieval process, make sure your internet network is stable.



4. Check the Laravel Installation in the Browser

If the process is complete, in the /xampp/htdocs directory a new folder will appear with the project name you specified earlier.


If you want to make sure Laravel is installed or not, you can point the Command Prompt to the directory that was created earlier. After that, use the code below:

php artisan serve


If your terminal says Laravel development server started after you use the code, then you can open the link that appears in the browser. The default is 127.0.0.1:8000. Later on the homepage will appear Laravel writing as below:




If the display is like the image above, then the Laravel install on Windows has been successful.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.