How to install specific Laravel version using Composer

Last update: 04-25-2024

Install Composer

Composer can be downloaded from getcomposer.org/download/. If you're on Linux, you can download the prebuilt package with wget:
wget https://getcomposer.org/download/2.7.4/composer.phar
Then, move it to a globally accessible folder:
sudo mv composer.phar /usr/local/bin/composer

Create your Laravel application

The simplest way to create a new Laravel project:

composer create-project laravel/laravel your-app-name

But you can specify the Laravel version to be used:

composer create-project laravel/laravel="version" your-app-name

Create a Laravel 10 application with Composer:

composer create-project laravel/laravel="10" your-app-name

Create a Laravel 11 application with Composer:

composer create-project laravel/laravel="11" your-app-name
StocksComparison.com ad

0 Comments

Add a new comment: