How to install Laravel 5 application in different versions

Laravel 5.3 framework has been just released. I won’t focus on new features about it right now, I will just make it clear how to install different versions of Laravel without a problem as for many especially new developers it causes problem. As Composer is standard for installing dependencies let’s use this method to install new Laravel applications.

To create brand new Laravel  project we will use composer create-project command (in command line). You will need to have obviously installed Composer itself.

Installation of Laravel 5.3 application

Ok, so when we want to install latest stable Laravel application we can use:

As your-project-name you should obviously put something else – the whole application will be put into this directory. Using this command we’ve just installed latest version of Laravel 5.3 application as it’s current master branch for Laravel.

Okay, but what in case we want to install some other version of Laravel application? Is it possible at all? Sure, we can add one extra argument to command with Laravel application version.

To install Laravel 5.3 with this method, we should use:

Mind that we haven’t used 5.3 here but 5.3.* . What’s the difference? If we use 5.3 in fact we tell to install 5.3.0 version what is probably fine at the moment but in future when Laravel application will be updated we would have installed outdated version out of the box and we don’t want it. So we should in this case choose 5.3.* to make sure we will have installed latest Laravel  5.3 application.

Installation of previous Laravel versions

Ok, so what about installing any other versions of Laravel? Well, it works exactly the same, we should again pass the version we are interested in.

So to install Laravel 5.2 we should use:

Share on:

Hello, I am Dharmendra Yadav and I am a Python Developer with experience in web development using Django, Flask, REST API, SQL, MySQL, HTML, CSS, JavaScript, WordPress, Oracle Cloud, AWS and Git. I also write technical articles where I explain web development and Software Engineering. Facebook , Linkedin

Leave a Comment