+1 (506) 500-5957 sales@monovm.com

How to Install Laravel on Localhost XAMPP

To install laravel on localhost you should install XAMPP on your computer. Laravel needs the Composer program to manage its extensions.

Posted: 27 Feb, 19 Updated: 23 Dec, 22 by linda Y 2 Min

How to Install Laravel on Localhost XAMPP

First, you should install XAMPP on your computer. To install different versions of Laravel, the PHP version of your XAMPP program is very important.

To install Laravel, version 5.7, you need the following specifications:

PHP >= 7.1.3

OpenSSL PHP Extension

PDO PHP Extension

Mbstring PHP Extension

Tokenizer PHP Extension

XML PHP Extension

Ctype PHP Extension

JSON PHP Extension

BCMath PHP Extension

If you have a lower version of PHP, you should upgrade it.

Laravel needs the Composer program to manage its extensions. If you do not have this program, you can download it from the site of Laravel or via the website getcomposer.org.



After downloading Composer.exe, run it in the installation process. If you are prompted for the php.exe path, its address in your system is xampp/php by default.

If the composer is installed correctly, you'll see the below picture by entering the composer command in cmd.


To install Laravel on the localhost, type the below command in cmd.

C:\> cd xampp

C:\ xampp>cd htdocs


Now in the corresponding path, enter the following command to create a new Laravel project:

Composer create-project --prefer-dist laravel/laravel new_project

Now, Laravel is being installed on your system. After installation, go to the new_project folder and execute the php artisan serve command.

C:\ xampp\ htdocs > Cd new_project

C:\ xampp\ htdocs \ new_project >php artisan serve


A new message will be displayed on the server and your work on cmd will be completed.

Just open your browser and enter one of the addresses below.

http: // localhost / new_project / public

At this moment, your new Laravel project will be successfully installed and run.


Also, you can read about Installing Laravel on cPanel web hosting through SSH in this Article

linda Y

My name is Linda, I have Master degree in Information Technology Engineering. I have some experiences in working with Windows and Linux VPS and I have been working for 2 years on Virtualization and Hosting. 

user monovm


2019, Sep, 19

Thanks for this article was really helpful. What if I want to create subsequent projects, do I still have to run the same command 'Composer create-project --prefer-dist laravel/laravel new_project' and be connected to the internet while doing that or can I do another way

user monovm


2020, Feb, 20

Thank you!

user monovm


2020, Apr, 20

This was so simple and helpfull. Thank you!!

user monovm


2020, Apr, 20

Thank you very much for this simple and workable solution

user monovm


2020, May, 20

How do you deploy the laravel in windows server(hosted server). Inside the server(local) I can run in both way. http: // localhost / new_project / public But using public url I can only able to run with this method "http: // example.com/ new_project / public" not with "http: // example.com:800". Could please share the reason?

user monovm


2020, Jun, 20

I assume when you run it in your local as you first execute the command php artisan serve. So when you are in a public url, have you configured your server and you run the same command?

user monovm


2020, May, 20

Thanks. It worked like magic

user monovm

Susith Nonis

2020, Jun, 20

Happy to hear that!!

user monovm


2020, Jun, 20

Aru u stupid? This has nathing todo with xampp. U r serving it with artisan.

user monovm


2020, Jun, 20

Hey, Is it possible to enter the/your Laravel Local host from another machine in the/your same network envoriment?

user monovm


2020, Jul, 20

you try too mush, thanks. works for me just simple

user monovm

Antoniy Yushkevych

2020, Jul, 20

We are glad you found this article useful :)

user monovm

luis barrera

2020, Aug, 20

Mejor explicado imposible.. gracias monovm , aca desde la tiera de shakira.. ahora aprender a usar lavare

user monovm


2021, Mar, 21

Thank you, I am also stupid. I followed the Screens and nothing worked. I started XAMPP/Apache (8.03) on Win10 and it worked. I also did "phpinfo()" and it worked. No need to fireup "php artisan serve" in my opinion.

user monovm


2021, May, 21

the xampp got error how can i slove it

user monovm

Antoniy Yushkevych

2021, May, 21

Thank you for your question, most likely, you will need to do the following:

  1. Ensure that your user account has administrator privilege.
  2. Disable UAC (User Account Control) as it restricts certain administrative functions needed to run a web server.

To Disable UAC, do this:

  • type UAC into the Windows search bar and click on "Change User Account Control settings"
  • In the opened window, slide the bar all the way down to "Never Notify".
  • Click on "OK" to save the changes.


user monovm

luckily not mike

2021, May, 21

well mike, if you paid attention you could see that laravel indeed get installed onto xampp files.

user monovm


2021, Jun, 21

Worked smoothly. Thanks a lot

user monovm


2021, Sep, 21

This worked But this http: // localhost / new_project / public didn't work Can you help ?