How to setup laravel framework in wampserver properly?

Installing Laravel 4 on WAMP

1. Enable OpenSSL

OpenSSL must be enabled in the PHP configuration.

Edit php.ini in your WAMP’s PHP folder, e.g.:

C:\wamp\bin\php\{Your.PHP.Version}\

where {Your.PHP.Version} is something like php5.4.12.

Note:

You should not edit the php.ini inside

C:\wamp\bin\apache\{Your.Apache.Version}\bin

where {Your.Apache.Version} is something like Apache2.4.4, because that is not the file that Composer uses.

Find the following line and remove its preceding semicolon (if there is one) and save the file. So change

;extension=php_openssl.dll

to

extension=php_openssl.dll

2. Install Composer

Now we need to install Composer. This is a dependency manager that will download the latest release of Laravel and specific versions of Laravel’s dependencies, such as Doctrine and Symfony.

2.1. Download the Composer Windows installer from

https://getcomposer.org/download/

2.2. Run the installer.

2.3. When it asks for the location of php.exe, point it to the executable in your WAMP’s PHP folder, e.g.:

C:\wamp\bin\php\{Your.PHP.Version}\

2.4. Finish the installation.

2.5. Open a command-line interface (cmd) and type:

composer

It should return a list of options. If you get an error, restart your computer and try again.

Composer has now been installed and added to your PATH environment variable. This means you can run it from any directory using the command-line interface.

3.Install Laravel

Now that Composer has been installed, Composer can download and install Laravel on your system.

3.1. Open a command-line interface (cmd).

3.2. Go to the directory in which you want to install Laravel. This is usually your development directory. In this tutorial, we’ll use C:\wamp\www\laravel

3.3. Instruct Composer to install Laravel into a project directory. We use project name myproject.

composer create-project laravel/laravel myproject --prefer-dist

Note:

This will install Laravel in a subdirectory named myproject under current working directory.

Now your project has a running directory like

C:\wamp\www\laravel\myproject\public\
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s