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

gandra404's avatar

How to setup homestead with php 5.4 on linux?

There is one production app made in laravel 4 on shared hosting which still use php 5.4. I have linux development machine with php 7. Is it possible to install homestead with php 5.4? If yes, please feedback how.

0 likes
12 replies
TerrePorter's avatar

You can install a older version of homestead. I have a list of a few, but not with me currently. I can post it later when i get back to the office.

1 like
svpernova09's avatar

It's not 5.4 but if 5.5 will work:

You need to use a different box. The default box is broken. (I'm currently writing a blog post that explains all of this)

In yourHomestead.yamlfile add:

box: Svpernova/homestead-legacy

And use version 2.1.8 of the Homestead Source Code (The Github Repo)

1 like
TerrePorter's avatar

The hard part will be getting the vagrant box, some of the older ones are not available. I have a back up of a few, if you cant get a version let me know and i can check what i have.

1 like
svpernova09's avatar

@TerrePorter @gandra404 The old 5.5 And earlier versions of Homestead box have had their MySQL passwords expire. if you follow the instructions in my previous reply you'll use a box that has this already fixed.

1 like
TerrePorter's avatar

@svpernova09 I'm not using the old homestead as much anymore but that is good to know there is another option. Thanks.

gandra404's avatar

@svpernova09, I have succeed to install env with PHP 5.5.9. Can you provide code behind your vagrant box to try to accomodate it to use php 5.4?

svpernova09's avatar

@gandra404 You'd have to go back to a pretty old version to use 5.4, and since 5.4 is end of life, I'd rather not spend the time to make Homestead compatible. You should upgrade to a supported version of PHP :/

gandra404's avatar

@svpernova09, I totally agree with you. But at the moment company has site on shared hosting with PHP 5.4. Any new deploy of functionality may be broken if developer count on some feature in PHP > 5.4 and he is not able to test it before delivery. Until migration is made reality is that production is on PHP 5.4 and we have to live with that fact until migration. So looking for solution how to mimic that environment.

Please or to participate in this conversation.