How to Install Laravel 9 on Windows Xampp Server Steps

Throughout this Laravel Installation in Windows Xampp Server Tutorial you will learn how to Install laravel application in windows 8, 10, 11 etch version of xampp server.

How to Install Laravel on Windows Xampp

Follow the below simple and easy steps to install laravel 9 on windows 10/11 xampp and ubuntu with composer:

  • Download and Install Composer
  • System Requirement
  • Install laravel 9 app
  • Setup database credentials
  • Install laravel UI & generate Auth Scalfold scaffolding
  • Run the Application on Development Server

Download and Install Composer

Before installing laravel on windows. first of download composer on windows system. If you already composer download / installed Composer.  go to STEP 2, otherwise follow the steps.

Click Download Composer from Download Composer

System Requirements

  • 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

Install Laravel

Type the command In the command prompt => composer create-project laravel/laravel Project Name. It will install a laravel new setup on your windows xampp:

composer create-project laravel/laravel laravel-app

Database Configuration

In the Laravel project, there is a file called .env. It’s for project configuration. To connect with the database we need to set database credentials.

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_database_username
DB_PASSWORD=your_database_password

Install Laravel UI & Generate Auth scaffolding

Laravel UI is an official package that contains the extracted UI parts from a Laravel project. To generate UI scaffolding, we first need to install the laravel/ui.

composer require laravel/ui

Once the laravel/ui package has been installed, you may install the frontend scaffolding using the ui Artisan command:

/**
 * Generate login / registration scaffolding
 * Run one command if needed auth or skip this
 */
php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth

After that you need to run the following commands:

npm install && npm run dev
# migrate database
php artisan migrate

Run Development Server

In this step to use the php artisan serve command .it will start your server locally

php artisan serve

You have successfully install laravel on windows, Now Go to the browser and hit the

http://localhost:8000/

If you are not run php artisan server command, 

Server Error 500 when accessing Laravel

Download New Laravel Setup and Run, It will show server error 500 when accessing Laravel 9:

If your using ubuntu machine. open your terminal and go to your project root directory and type the command in command prompt :

sudo chmod  -R 777 storage
sudo chmod  -R 777 bootstrap

I hope you like this post.. hope you enjoy it…

Leave a Comment