Image for post
Image for post

If you’re running a recent version of Laravel Homestead (PHP 7) and you need to install an old Laravel app, in my case 5.0. You’ll run into difficulties as 5.0 is not compatible with PHP 7.

Here’s how to set up Laravel Homestead with PHP 5.6 for the project.

SSH into your current Homestead box and change the directory to the Laravel 5.0 project.

cd ~/Homestead
vagrant ssh
cd ~/Code/laravel50

Require Homestead v2.2.2 for the project. composer require --dev laravel/homestead 2.2.2

After it has installed, run the make command to generate the Vagrantfile and Homestead.yaml files.

php vendor/bin/homestead make

Once this is done, exit the SSH session and change directory to the project path on your host machine. Now boot the vagrant…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store