A quick guide to Install Laravel 8 on Windows 10 localhost Wamp server

Laravel is a web application framework created in PHP language. it is open-source framework. it provide functionality for building powerful and robust applications. it provided a structure that saves lots of time and plan for large applications to develop in laravel.

Below I mentioning some steps to install laravel in Wamp server.

Table of Contents –

1) Download composer

2) Installation composer

3) Check the server requirement for the setup

4) Installing Laravel

5) Create database for project

6) Update .env file

7) Key generate

8) Migrate database command

9) Start/setup some setting

1) Download composer

you need visit on www.getcomposer.org. and download composer. If you already composer download / installed Composer. so you can move on next step.

2) Installation composer

click on download composer.exe file then it will open one prompt box :

click on next button.

click on next button. it will also some step to installation composer we need to provide setting then it will install on Wamp server.

3) Check the server requirement for the setup

PHP >= 7.3
BCMath PHP Extension
Ctype PHP Extension
Fileinfo PHP extension
JSON PHP Extension
Mbstring PHP Extension
OpenSSL PHP Extension
PDO PHP Extension
Tokenizer PHP Extension
XML PHP Extension.

4) Installing Laravel

first open Window’s command Prompt (cmd.exe) and type the following:
cd F:\wamp\www where you have installed/available wamp server.
composer create-project –prefer-dist laravel/laravel Project_name. where Project_name i used Laravel_installation.

5) Create database for project

we need to create new database from http://localhost/phpmyadmin .

6) Update .env file

in root folder we need to open .env file and get below code.

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:etD3ZLD7/ricJ2k7gX1dpAnShufaGsV0BV0MBHxxv2Y=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

Here, we need to change some information like APP_NAME value like Laravel to “Project name” . DB_DATABASE value like laravel to “database name”. DB_USERNAME value like root to “database username” and DB_PASSWORD if its available.

7) Key generate

if installation successfully done, so we need to change APP_KEY. here is very simple step to generate new key. we need to go under laravel installed directly and run below command.

php artisan key:generate

8) Migrate database command

we need to run first database command. “php artisan migrate” it will load/create some default database table that require for default setup.

php artisan migrate

if it will give error like so we need to process below things –

we need to go to app/providers and open AppServiceProvider.php file. here need to add on top use Illuminate\Support\Facades\Schema; and also under boot function it need to add Schema::defaultStringLength(125);.
if you added both things then you can again run once php artisan migrate. if it will give already table exists error so you need to deletes all tables in your created database.

9) Start/setup some setting

Here, we require some files to add like index.php in root folder and .htaccess file.
index.php require code like –

htaccess require code like –

after above changes we can run website directly through browser hit.
http://localhost/Laravel_installation/ . congratulations we have installed laravel 8 in localserver wamp server. we can change/remove default laravel content and made our changes.

Leave a Reply

Your email address will not be published. Required fields are marked *

2 + = 12