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

carltondickson's avatar

Is PHP a pre-requisite for Homestead?

Hi,

We're using Homestead in one of our PHP projects and from what I can see in the documentation you don't need to have already installed PHP.

Our process is that we checkout the project onto a machine with no PHP on it and try and run vagrant up but we get an error in our Vagrantfile

Message: LoadError: cannot load such file -- ./vendor/laravel/homestead/scripts/homestead.rb

Which will be the case when the project has freshly been checked out as the vendor directory hasn't been created from composer install which the machine doesn't have either.

On a side note Composer has a dependency of PHP 5.3.2 (https://getcomposer.org/doc/00-intro.md#system-requirements) so a little confused at how Homestead can be used without PHP

Are you supposed to checkout homestead in a separate directory and let the vagrantfile know about this confDif somehow?

0 likes
5 replies
automica's avatar

@carltondickson you'll have to install homestead with composer which requires php on the host to run it.

where did you read that homestead didn't need PHP?

carltondickson's avatar

@automica - https://github.com/laravel/homestead#introduction

"Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine."

Same thing is also on official docs - https://laravel.com/docs/5.5/homestead

"Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine."

I thought I must be missing something but couldn't find anything that covers how to get it up and running without using Composer in some way

Sinnbeck's avatar

Are you installing it globally using git?

git clone https://github.com/laravel/homestead.git ~/Homestead 

I would assume it only requires php if you originally install it using composer for a single project

automica's avatar

@carltondickson I guess if you install vagrant/homestead this way

vagrant box add laravel/homestead

then its probably accurate. I've always used composer though (but work on mac so have always had php too).

carltondickson's avatar

We are using it per project at the moment, so when you checkout one of the projects it will already have the initialised Homestead files already in it

Vagrantfile
aliases
after.sh
Homestead.yaml

Please or to participate in this conversation.