mohammadkhallaf's avatar

how to downgrade from laravel 9 to laravel 8

i'm downgrade PHP version from 8.1 to 7.4

0 likes
3 replies
thinkverse's avatar

I would say that is a bad idea since PHP 7.4 is no longer a supported version of PHP and reached end of life a few days ago. Best to stick with PHP 8.0+ and above.

thinkverse's avatar

@mohammadkhallaf but if you wanna use Laravel 8 anyway you can start a new project with composer and grab version 8. If the project is not that far along I'd recommend creating a new Laravel 8 project and migrating over your project step-by-step.

composer create-project laravel/laravel:^8.0 example-app

If you already have a Laravel 9 project that's far along I'd stick with that. Otherwise, to downgrade you'd have to update the composer.json file to use the versions used by Laravel 8, you can find that by looking at the 8.x branch on laravel/laravel.

You might also need to change some files that came with a Laravel application depending on what varies between Laravel 8 and 9. Then downgrade any potential packages your application has as well. Lastly, test out your application, see what breaks and fix that.

2 likes

Please or to participate in this conversation.