Wednesday, March 18, 2015

How To :Install Laravel framework with WAMP server

Hi! I now started to learn and use Laravel framework. Today, i will share how to use Laravel FW with WAMP stack server, or any server application that you prefer. I found most of tutorial how to deploy laravel framework on WAMP server are crap! So here, i create this tutorial.

First of all, you need WAMP server. Just download from here :
http://www.wampserver.com/en/
* You can use any prefered server. For this tutorial, i'm using WAMP server

After install WAMP server, Open "php.ini" with you prefered text-editor (i'm using Notepad++), find and enable "openssl" extension by removing semicolon ';' at front at line 970 just like this:
extension=php_openssl.dll

Click on WAMP icon->PHP->PHP Extensions and enable: php_openssl, php_curl, php_socket. Then click on wamp icon->Apache->Apache Modules and enable ssl_module


Second, you need a tool called "Composer". For Windows user, run the installer which can be download from here :
http://getcomposer.org/Composer-Setup.exe
* Install Composer into the same directory php.exe is located.


To use Laravel framework,there is 2 method that can be use. Let's start now:

# Method 1 : Via composer create-project
This is recommended method to install Laravel because composer will download and use the latest and stable release of Laravel framework.

Open terminal/console/cmd and navigate to you webroot and enter this command:
composer create-project laravel/laravel mySite --prefer-dist

Now, Composer will download the latest Laravel and library needed. After a finished the process. You site will be available at the following address :
http://localhost/mySite/public

# Method 2 : Via composer install & standalone Laravel
Using this method, you need to download Laravel framework from Github and extract to you webroot.

Open terminal/console/cmd and navigate to you webroot (for example in this tutorial: C://wamp/wwww/mySite/) and enter this command:
composer install

Now just wait the process until it finished. Then try to surf you website at
http://localhost/mySite/public


That great! Now you are using Laravel framework and Web Artisan ;)

No comments:

Post a Comment