Installing Laravel 8 and Composer with XAMPP on Windows

Installing Laravel 11 and Composer with XAMPP on Windows

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.

On the 12th of March 2024, Laravel released its latest version which is Laravel 11.

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 10

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

How to install Laravel 11 on Windows with XAMPP

Installing Laravel 11 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 8.2

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

1. Installing XAMPP

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

  • Apache HTTP Server
  • MariaDB
  • PHP
  • PhpMyAdmin

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

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

Step #1: 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

Step #2: 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

Step #3: 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 11

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

Open your terminal and run the following command:

composer global require laravel/installerCode language: Bash (bash)

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 blogCode language: Bash (bash)

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

composer create-project --prefer-dist laravel/laravel blogCode language: Bash (bash)

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

php artisan serveCode language: Bash (bash)
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 10 to Laravel 11

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 Code language: Bash (bash)

Then, use the following to install Laravel 11

composer global require laravel/installerCode language: Bash (bash)

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 11, developers will be more able to create web applications that are efficient and easier to maintain.

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

2 Comments.

  1.  Problem 1
      – laravel/framework[v8.12.0, …, 8.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0, …, 1.x-dev].
      – league/flysystem[1.1.0, …, 1.x-dev] require ext-fileinfo * -> it is missing from your system. Install or enable PHP’s fileinfo extension.
      – Root composer.json requires laravel/framework ^8.12 -> satisfiable by laravel/framework[v8.12.0, …, 8.x-dev].

    this error is coming

    1. Hi Shekhar kumar!
      I had this problem today.
      To solve this problem uncomment the line “extension = fileinfo” in php.ini
      Hope this helps.

Leave a Reply