Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

supersixtwo's avatar

Downgrade from Laravel 5.1 back to 5.0

Hello,

I need to properly downgrade from 5.1 back to 5.0. Was told by systems that we would have the "latest" version of PHP available... I guess they thought that meant php 5.4

Anyway.,.. I upgraded to Laravel 5.1, made about 5 commits, then went to deploy to production and it's only at php 5.4

I need to revert back to Laravel 5.0 until they are ready to update their debian packages systems with php 5.6

Thanks! Troy

0 likes
11 replies
supersixtwo's avatar

@mstnorris , the problem with that... there has been development and multiple commits since then. So, rolling back pre-5.1 would wipe out all those changes.

bobbybouwmann's avatar
Level 88

I think the easiest way would be updating your composer.json file to use version 5.0. Then completly delete the vendor directory and run composer install again. From there check if all your code still works or not ;)

3 likes
daolincheng's avatar

@bobbybouwmann Could you please provide more details about how to update composer.json ? Do I just change this "laravel/framework": "5.1.*", to "laravel/framework": "5.0.*",?

Thanks.

bobbybouwmann's avatar

Yeah you can do that! However I wouldn't recommend downgrading in any way. The newer version have more features, better tested and so on

daolincheng's avatar

@bashy The web server I need to deploy on has PHP 5.5.0. And laravel 5.1 requires PHP 5.5.9.

@bobbybouwmann I changed composer.json to "laravel/framework": "5.0.*", then run composer update. After it's done, I ran php artisan --version to check laravel version, I got Laravel Framework version 5.1.19 (LTS)

andreportaro's avatar

Wow guys, just read the question (sorry if I'm being rude), but the guy has a requirement of being able to deploy on Php 5.4!

Ok, so I had this same issue today, and wasn't completely able to downgrade - I deleted vendor folder, deleted composer.lock (which disabled me from running a proper composer update), and changed php version to 5.4.4 and laravel to 5.0.*.

What happened then was that it almost went through nicely, but the last command (php artisan optimize) just wouldnt go.

What I had to do?

Fresh install of laravel 5.0.*, and ported my work - controllers, models, requests, etc. My luck it was the companies first project on laravel, and only one day of work had to be ported.

I was developing on homestead runing php 7 and latest laravel (5.2.something).

Hope you got through with this already, but nonetheless, here's what I had to do.

Please or to participate in this conversation.