How to Install Laravel 9 PHP Framework

Sovary June 13, 2022 2.06K
1 minute read

Hi Artisan, today I am going to explain you how to install Laravel 9 with composer. I will explain and show step by step to install composer and Laravel project.

To install Laravel 9 project you have at least composer version 2.3.7+ and PHP version 8.0+

Install Composer

Before we can download laravel we have to download composer and install it. If you already installed composer, you can check composer version run command below:

composer --version

Install Laravel

Launch command prompt (cmd), and run command as below

composer create-project laravel/laravel blog

See image below:

install laravel 9 command composer

After completed download you will see a folder named blog which is contain laravel files. We can check Laravel version but to do that we have to enter directory Laravel project by command

cd blog

 To check your Laravel version with command below:

php artisan --version

Database Configuration

In Laravel root directory you will see a file named .env. There is afew configuration related to your credential information. To connect with the database you have to modified following credential

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

Now we can run the project with below command

php artisan serve

Then we can go to browser and see first home page laravel project via http://localhost:8000

install laravel 9 home page demostration

Hope you can install successfully and run Laravel project. Thanks

Laravel  PHP  Laravel 9 
Author

As the founder and passionate educator behind this platform, I’m dedicated to sharing practical knowledge in programming to help you grow. Whether you’re a beginner exploring Machine Learning, PHP, Laravel, Python, Java, or Android Development, you’ll find tutorials here that are simple, accessible, and easy to understand. My mission is to make learning enjoyable and effective for everyone. Dive in, start learning, and don’t forget to follow along for more tips and insights!. Follow him