English
+370 5 205 5502 sales@monovm.com

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

27

Feb, 19

How to Install Laravel on Localhost XAMPP

How to Install Laravel on Localhost XAMPP

At 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.

install-composer

composer-install2

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 below picture by entering composer command in cmd.

composer2

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

C:\> cd xampp

C:\ xampp>cd htdocs

xampp

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

php

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://127.0.0.1:8000

http: // localhost / new_project / public

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

laravel2

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

Marcel

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

Nimesh

2020, Feb, 20

Thank you!

user monovm

Steve

2020, Apr, 20

This was so simple and helpfull. Thank you!!

user monovm

ANAND

2020, Apr, 20

Thank you very much for this simple and workable solution

user monovm

gopinath

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://127.0.0.1:8000 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

Cristian

2020, Jun, 20

I assume when you run it in your local as http://127.0.0.1:8000 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

Lovette

2020, May, 20

Thanks. It worked like magic

user monovm

Susith Nonis

2020, Jun, 20

Happy to hear that!!

user monovm

mike

2020, Jun, 20

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

user monovm

Shiro

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

Joseph

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