In this post, you will learn how to install Laravel (latest, specific version), and also I will show you 3 different ways to how to install Laravel. Among 3 ways, I use most of the time way number 1 . Hence let’s see how to install or setup Laravel Framework.
Laravel Installation 3 different ways
- Before install laravel check your server php version like for laravel 5.3 ,you need higher than or equal version php5.6.4
- Make sure that composer install in your pc
Way 1:(I always follow this step) .this way always installs the latest version
- go to your local server project folder .my case as a local server I am using wamp. For that, Go to wamp/www/ directory, hold shift key in the keyboard on www folder and right click then click open command window here.
- write following line on the terminal or in command prompt.
1composer create-project laravel/laravel yourprojectname
here yourprojectname = the project name so you can change the name according to your choice.
It may take some time to install based on your internet speed. So now check.
Go to the browser. Write localhost/yourprojectname/public
- Download laravel zip file(latest laravel version) from github https://github.com/laravel/laravel and unzip and put this unzip folder in wamp/www folder . Hold shift key in keyboard on in wamp/www/folderproject/ then right click and click open command window here .write composer install in command prompt.
- after install laravel then goes to wamp/www/laravelproject
- Copy .env.example from here ,and paste it here then .env – Copy.example will be create,
- then open sublime or your text editor,open .env – Copy.example file right click and rename to .env and enter
- then goes to wamp/www/laravelproject ,shift+right click ,write php artisan key:generate
Way 3:(For installing specific version)
- go to wamp/www/ directory, hold shift key in the keyboard on www folder and right click then click open command window here.
- write composer create-project laravel/laravel yourprojectname your_version in command prompt.here your_version can be 4.2,5.1,5.2,5.3,5.4,5.8suppose for laravel 5.3 write composer create-project laravel/laravel yourprojectname 5.3