How to Install Laravel 9.0 for windows10 localhost server

Laravel is a PHP web application framework with expressive, elegant syntax. In this blog post we have shared a step by step guidance for installing laravel on windows.

What is Laravel

Laravel - php web application framework
Laravel – php web application framework

Laravel is a free, open-source PHP web framework.

Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.

Why Laravel?

There are a variety of tools and frameworks available to you when building a web application. However, we believe Laravel is the best choice for building modern, full-stack web applications.

What is Laravel installer?

Laravel Installer is open-sourced software licensed under the MIT license.

In the case of installing Laravel 9.0, you need XAMPP and Composer pre-installed on your computer.

Now the first thing that we need is to get the xampp.

Download XAMPP on windows 10

Open your browser and search for the right keyword xampp that go with the first search result showing www.apachefriends.org (XAMPP Installer and Downloads for Apache Friends).

Now on the homepage of www.apachefriends.org website, you will see the download options for

  • XAMPP for Windows
  • XAMPP for Linux
  • XAMPP for OS X

After clicking one of above options the downloading of file will start automatically and you will get xampp-windows.exe a executable file.

Installing XAMPP for Windows

  • open xampp.exe file or run it as administrator
  • then click OK > Next
  • Again Next > directory selection
  • language selection > Next
  • Installation will be completed

Now check the C:\ directory where its showing \xampp folder or not.

Installing the Composer

To get Laravel installed we need to install composer first. So, to get composer on our computer follow these steps

Open your browser and search for keyword composer and then you will find www.getcomposer.org website. Open this website and simply click Download button to download composer installer file.

the composer-setup.exe file will be downloaded. open this file and click run to install.

If you want uncheck the developer mode tick mark.

The next important step to check for the php.exe file that will be used by the xampp as command-line php. If there is already available this file then ok but if it is not there click browse

C:\xampp\php\php.exe

then click next sometime and install. It’s done.

Once you do that you need to check that the composer working or not. So, press windows > type cmd > after opening command prompt > type simple command composer press Enter

you will get a result like below image showing

check result for composer running with version details
check result for composer running with version details

Now, once you do that you are able to install to Laravel to your computer.

Installing Laravel 9.0

We will do it using command prompt (cmd) so, go to the directory where you want to install the laravel.

But, first we need to see if there are server requirements for installing Laravel

Server Requirements for laravel framework

The Laravel framework has a few system requirements. You should ensure that your web server has the following minimum PHP version and extensions:

  • 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

I am doing it inside xampp\htdocs folder.

I copied my path c:\xampp\htdocs and switch to the cmd and type

cd c:\xampp\htdocs

and hit Enter, Now you are able to install laravel inside htdocs folder.

inside cmd type

composer create-project laravel/laravel my-site

Now the processing will start and you see that many lines are scrolling upside like hacking animations inside movies the directors choose to show us that it is very difficult task they are doing.

It will also download many files.

after finishing this process type cls command into cmd hit Enter. Now we will run laravel webpage using xampp.

Run Laravel 9.0 in windows

Run Laravel using cmd

Switch window to command prompt and type cd my-site

and now type

php artisan serve

and hit Enter

it will get php development server started for laravel and give us a port

like this https://127.0.0.1:8000

Open your browser and paste the port inside URL address bar and run. You will get a running sample webpage of laravel documentations or this is our laravel website homepage.

Laravel Project Homepage

Now, we can customize it.

keep in mind that when you close the cmd the webpage itn’t working.

Run Laravel using XAMPP

To run laravel website on localhost you need to run xampp Apache server running. So, open xampp and start the Apache server. once you do that go browser window and type

localhost/my-site/public and hit Enter

you will see that the previous webpage loaded here.

So, you are all set now. Customize your Laravel website and have fun!

Share your love
Neeraj Lamba
Neeraj Lamba
Articles: 39

Leave a Reply

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

I'm not a robot *Time limit exceeded. Please complete the captcha once again.

Website Design Trends in 2022 5 Movies that Programmers Should Watch Best Search Engine for Developers – You.com 06 Free Website Hosting Providers for Developers You should Know Learn Programming while playing games