Installing Laravel 8 and Composer with XAMPP on Windows

  Laravel

Laravel is one of the greatest PHP frameworks that you can use for creating web applications and if you’re still building your web applications through core PHP, then you’re giving yourself a ton of work.

Laravel 8 logo wallpaper

On September 8th of 2020, Laravel released its latest version which is Laravel 8, and if you still don’t know, Laravel releases a new version every six months.

You may refer to the table below.

VersionReleaseBug Fixes UntilSecurity Fixes Until
5.5 (LTS)August 30th, 2017August 30th, 2019August 30th, 2020
5.6February 7th, 2018August 7th, 2018February 7th, 2019
5.7
September 4th, 2018
March 4th, 2019September 4th, 2019
5.8February 26th, 2019August 26th, 2019February 26th, 2020
6 (LTS)September 3rd, 2019September 3rd, 2021September 3rd, 2022
7March 3rd, 2020September 10th, 2020March 3rd, 2021
8September 8th, 2020March 8th, 2021September 8th, 2021

Now, you may be asking…

If the bugs are not yet fixed for the newest version, does that mean I should not install the new version?

Well, that’s not always the case. Bugs are possible to be found on every version of Laravel.

If you don’t want to update your Laravel, you can always enjoy Laravel version 7 which gets another update on September 10th, 2020.

However, if you want to experience Laravel 8, then proceed reading as we’ll guide you on how to install Laravel version 8.

 

How to install Laravel 8 on Windows with XAMPP

Installing Laravel 8 on Windows is very easy. However, before we can enjoy the new version of Laravel, we have to make sure that our system is compatible and meets the following requirement:

  • PHP 7.3.0

If you don’t have PHP installed on your computer, don’t worry, XAMPP provides PHP on installation.

1. Installing XAMPP

XAMPP for windows 7.4.9 localhost homepage

XAMPP is one of the most popular cross-platform web server used mainly for local web development. Installing XAMPP into your computer provides the following packages:

  • Apache
  • MySQL
  • PHP
  • Perl

You can download their latest installer by clicking the download button below:

Once you have downloaded XAMPP, run it and just follow the steps below to install it properly.

a. Select the components

We usually just select Apache, MySQL, and phpMyAdmin. However, you may just select everything to make sure that nothing goes wrong.

installing xampp with custom components

b. Select the location

The default location for XAMPP is C:\xampp If you want to change the location, you may do it here.

changing installation folder for XAMPP

c. Starting XAMPP

After the installation, you should be able to run it and activate Apache and MySQL.

XAMPP control panel v.3.2.4

2. Installing Composer

Composer is an application-level manager that allows you to not only install libraries but also provides a standard format for managing dependencies of PHP software.

To install Composer, click the download button below.

After downloading Composer, just run it and don’t tick the checkbox for the developer mode. It will also ask you for proxy settings but just ignore it.

3. Installing Laravel 8

Now that we have everything we need, we can start installing Laravel.

Open your terminal and run the following command:

composer global require laravel/installer

4. Creating a new Laravel project

There are two ways to create a new Laravel 8 project. The first one is by using the command from Laravel itself:

laravel new blog

The second way is by issuing the Composer create-project command in your terminal:

composer create-project --prefer-dist laravel/laravel blog

Once the command is done creating the project, you can use the following command to test your app in your localhost.

php artisan serve
Laravel localhost default homepage

If you’re looking for an in-depth guide for creating a Laravel project, you may take a look at our full guide on how to create a Laravel project.

 

Upgrading from Laravel 7 to Laravel 8

If you’re using an older version of Laravel like version 7, you can upgrade to Laravel 8 by running the following commands in your terminal:

composer global remove laravel/installer

Then, use the following to install Laravel 8

composer global require laravel/installer

In other words, you will need to remove the old Laravel and re-install the latest version.

 

Conclusion

There’s no doubt that Laravel is one of the best for creating web applications. With the release of Laravel 8, developers will be more able to create web applications that are efficient and easier to maintain.

To learn more about the release of Laravel 8, check out the Laravel 8 release notes as well as the official upgrade guide if in case the above step does not work for you.

React to this topic
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments