Main Menu

How to Install Laravel on Localhost XAMPP

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

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

Category: Server Tutorials

Write Comment