How to install Laravel within Xampp

Abdul Azeez
2 min readFeb 4, 2021

Laravel is a feature rich, open-source PHP web framework, which is robust and easy to understand. It is a server-side framework, with it we can build apps with features typically requiring a backend, such as user accounts, exports, order management etc

When i first tried to install laravel, the documentation had a lot steps requires a lot downloads such as docker, php, composer etc 😐. So i started to look for other ways. I had a xampp apache software installed in my windows which already had php installed with it.

Installation

First we need to add php folder path to environment variables.

Search Environment Variables in search console. select Edit the systemenvironment variables → Environment Variables. Browse and add the php folder into Path variable.

Now we need to install composer (a dependency manager for PHP). So create a folder composer inside xampp folder, start CMD and run following commands.

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"

It will download a composer.phar file.

To install Laravel go to D:\xampp\htdocs and type following in CMD

php D:\xampp\composer\composer.phar create-project laravel/laravel laravel “5.1.*”

You have installed Laravel framework in the D:\xampp\htdocs\laravel directory.

Now start xampp server and open localhost/laravel/public and you will see page like below.

Thanks for reading … 😊. Hope this helps.

--

--