Installation of Laravel in Windows

Here are some steps required to install Laravel in Windows operating system

1. Server Requirements

Installing Laravel first your system must satisfied few system requirements

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

Laravel Homestead virtual machine provides the all server requirements needed to install Laravel. Before launching Laravel Homestead you must install VirtualBox 6.x, VMWare, Parallels or Hyper-V. After installation of these one you must install “Vagrant”.
OR
If you are not using Homestead then you will need to install other web server such as “WAMP” or “XAMPP” free web server. These web servers automatically install everything you need to develop Web applications and provide the server for your Laravel application.
In this article, I have used the WAMP server.

1.1. Install server using WAMP(Window, Apache, MySQL, PHP) server
Download the web server from link: http://www.wampserver.com

After completion of download, install and run exe file

2. Installing Laravel

After installation of web server, install the “Composer” first in your machine before installing Laravel.

2.1. Download the composer from the link: https://getcomposer.org/download/

Download and run the composer-setup.exe file

Installing composer
For installing the latest version of Laravel project, make sure that you have selected the latest PHP version.

2.2. Installing Laravel Via Composer
Open terminal (cmd) in your machine and use directory “wamp64\www”

After open the terminal check the composer is installed or not by using “composer” command’


Install Laravel framework by issuing the composer “create-project” command in your terminal

composer create-project –prefer-dist laravel/laravel projectname
This command will create the latest version of Laravel under the “wamp64/www/” directory.

After the project installed in your directory and we have installed php server, you may use “serve” artisan command to start development server: http://127.0.0.1:8000
Command: php artisan serve

Note: After installation of php server and composer, you must add environment variable on your system before start your project. These directories exist in different location based on your operating system, but some common locations of directory in windows are:
Local server: “C:\wamp64\bin”
Composer: “%USERPROFILE%\AppData\Roaming\Composer\vendor\bin”