Install laravel on windows xampp or wamp
Laravel 5.1 is very easy to be install on windows. In this tutorial we suppose that you have already installed PhP on your machine.
Basic Requirement for Laravel:-
- Must have install PhP with a version of 5.5.9 or above like 6.1.3 etc
- Windows environment or 64 or 32 bit.
- xampp or wamp on machine.
This is the new version and you are getting a new installation feature so guess how fast work is going on updation.
Install laravel on windows xampp/wamp steps :-
1. It’s requires Composer to manage its dependencies. so first need to downloadcomposer
1.1). just follow the process,
1.2). At some point It will ask you to choose the Php.exe file and press next.
1.3). let it be download composer and related setup.
2. Now install composer on your machine.
3. Run below command to check composer has installed successfully
# check composer working :/> composer
4. Now installed successfully we need to install laravel installer via composer so open windows command prompt and run below command to install.
# installing installer composer global require "laravel/installer=~1.1"
5. Set PATH environment variable for setup PATH run below command
# setting up env path set PATH=%PATH%;%USERPROFILE%\AppData\Roaming\Composer\vendor\bin
PATH :- path is a location where composer installed ” ~/.composer/vendor/bin” on Windows path should be used:
“C:\Users\\AppData\Roaming\Composer\vendor\bin” so in above command added “%USERPROFILE%” so this will auto get your computer name
For test run command laravel to check you have path setuped correctly
# testing command laravel -v
Laravel command not found windows :-
This is an optional part if your above testing command not running correct. sometimes if you not setup the PATH correctly you will get Laravel command not found error on windows. for resolve laravel command not found error you need to setup your path environment variable correctly. many times we stuck this error so i am adding this part also. if you have setuped path variable right run command and you will get output success then keep continue with next step to successful installation.
6. Now We need to change directory where we want to install laravel so first change and go to your preferred location to install then run below command to install.
# installing laravel new laranew
Now you have done with Install laravel via laravel installer windows(xampp/wamp). and open url on http://localhost/laranew and bam.
Now Enjoy coding with laravel.
Have a nice day!