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

RoboRobok's avatar

How to run my own PHP script on Homestead provision?

I made a script generating Homestead.yaml based on my projects folder tree. What it does is basically mapping folder name to its *.test domain, using either /public folder (if it exists) or folder root. It works great, coupled with dnsmasq I no longer need to register any projects in hosts nor Homestead.yaml manually.

The next step would be to run this script automatically during Homestead's provision. Is that possible? Or maybe it's even possible to do it in more fancy way? I'd like to just make sure all my folders work with their domain and Homestead config, because of certificates, doesn't support any wildcard syntax.

0 likes
1 reply

Please or to participate in this conversation.