Here, I am going to describe how to install Laravel on Windows (WAMP server).
Apache with mod_rewrite enabled
PHP >= 5.4
MCrypt PHP Extension
1. Install Composer
2. Install Laravel via Composer
3. Configure virtual host on Apache
4. Edit host file inside ../system32/drivers/etc folder
5. Browse homepage.
You can skip step 1 if Composer already installed.
1. Install Composer:
To install Composer on windows OS please go to https://getcomposer.org/Composer-Setup.exe to download the setup file. Run the setup file to install Composer in your machine.
Please visit https://getcomposer.org/ to find out details about Composer.
2. Install Laravel via Composer:
Create folder laravelproject inside wamp/www folder. You can use your project name as folder name here.
Then open Git bash and then run following command to indicate your web root folder and install the project files.
composer create-project laravel/laravel –prefer-dist
It will take some time to execute the installation command. After successful completion a success message will show on command screen.
3. Configure virtual host on Apache:
Go to Apache conf folder inside bin directory i.e. C:\wamp\bin\apache\apache2.4.9\conf and then open httpd.conf file. Comment ttpd-vhosts.conf line like following-
# Virtual hosts
Then go to extra directory i.e. C:\wamp\bin\apache\apache2.4.9\conf\extra and then open httpd-vhosts.conf. Make changes like following-
CustomLog “logs/localhost-access.log” common
Options Indexes FollowSymLinks
Deny from all
Allow from 127.0.0.1
4. Edit host file inside ../system32/drivers/etc folder:
Open Notepad as administrator and then open host file to add Laravel project path there. Browse C:/Windows/system32/drivers/etc path and open hosts file. Add following line there-
Save the file and close the Notepad editor.
5. Browse homepage:
Go to browser address bar then write address laravel.work and reload the address. You can see an window like following-
For more details documentation please visit http://laravel.com/docs/4.2/installation
Enjoy and explore Laravel!