Downloading and installing the Laravel via composer in windows

Downloading laravel

Many people confused how to download and install the Laravel framework in there machines because the download the option/button is not available in the official website so its very painful to download the Laravel (if you are new), but believe me its very easy to download and configure Laravel but before downloading lets take a look on larval.

Laravel is a PHP framework and according to me its the king in the PHP world, It has many cool features to save you time like Eloquent ORM, Routing, Middlewares and it has its own templating engine. But before downloading you must have the following requirements.

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

So download the composer and install it in your local environment, Now open your command prompt and  type the code listed bellow.

composer create-project –prefer-dist laravel/laravel blog

Now, wait for few mints because it takes 4 to 7 mints its depend on your internet and your PC speed.



Once the downloading completed go to your project folder which we have defined above blog  and type php artisan server



Go to your browser and type this code 

In this way, you can download the Laravel and install it in your local machine but wait if you want to execute the laravel setup in your server XAMPP or WAMP then just follow the bellow instruction.

So we have installed the Laravel framework inside our c:/ folder just copy the folder and past it inside your xampp/htdocs folder.

Now go to your  xampp/apache/conf/extra/httpd-vhosts.conf and open the file httpd-vhosts.conf and paste this code in the last, make sure i have installed my xampp inside my c drive.

<VirtualHost *:80>
DocumentRoot “c:/xampp/htdocs”
ServerName localhost

<VirtualHost *:80>
DocumentRoot “c:/xampp/htdocs/blog/public”
ServerName laravel.test

Now go to your serach console and type notepad and right click on the notepad icon and chose Run as administrator

Once you open the notepad as administrator type ctrl+o OR you can go to file and select open, go to your c:/Windows/System32/drivers/etc and open the etc file make sure it will not show you anything just select All Files


Now past this code in the last line. localhost
::1 localhost laravel.test

Save the file and restart your server (xampp) and go to your browser and type laravel.test




Installing Laravel is the hard process if you are not familiar with Laravel or you are new and if you want to run Laravel inside your server environment i.e XAMPP or WAMP then you have to make extra changes in server files and as well windows files. By changing the files we can execute our Laravel projects inside our server.

I have been in the web design and development sector for over 5 years. I always provide high-quality courses which can be useful and practical for students, I am working for my community since 6 years and I have created thousands of lectures related to web development and different programming languages. Before selecting any course please make sure the language of the course because I am providing many courses in URDU and English language.

Leave a Reply

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

WhatsApp chat