How to install Old version laravel using composer

Today we will learn how to install old version Laravel using Composer for project that may require older version of laravel. Also sometime you have PHP older version < 8 then latest laravel version 9 not supported for php older version. Then this method is very useful.

Installation of old version of Laravel is straight forward and we can use directly composer create-project command to generate it.

Method 1 : Composer create-project

To install the old version of Laravel, the easiest way is to use the composer create-project command. Using this command we have to specify the only project name and Laravel version that we want it to be installed.

composer create-project laravel/laravel project-name 8.0.*

There is another method which is little complicated but you can also that method also.

Method 2 : Global Laravel Installer

If you don’t want to use composer method then you can go with Laravel Installer method also. For this you have to use “laravel new” command to install latest vesion first.

composer global require laravel/installer

laravel new your-project-name

Once the latest Laravel version install then update the composer.json file and change laravel version. Next remove the vendor file and run composer install command. Once finish you have to run php artisan and you will be able to see the version that you have set in composer.json file.

Consclusion

Today we learn two method of laravel different version of installation. Do you have any question fee freel contact us.

Related Trending Articles

Developer Diary

Share
Published by
Developer Diary

Recent Posts

Laravel vs Node Js: Which One Is Good For What?

Introduction In the world of web development, selecting the correct framework is critical. Laravel and…

3 months ago

Docker Cheatsheet: Essential Commands and Explanations

Introduction By enabling containerization, Docker has transformed the way software is built, deployed, and managed.…

8 months ago

Difference between Memcached and REDIS – Secrets of Caching

Introduction Speed and efficiency are critical in the ever-changing world of web development. Effective caching…

8 months ago

How to Revert a Git Commit: A Simple Example

Introduction Git, a popular version control system in software development, enables developers to track changes,…

8 months ago

What is Git Stash and Why Do You Need It

Introduction Are you tired of grappling with tangled changes and unfinished work while using Git?…

8 months ago

Difference between git stash pop and git stash apply

Introduction Version control is essential in software development because it ensures that changes to a…

8 months ago