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

longestdrive's avatar

Customizing Homestead set up

Hi

Currently using homestead v13 on a windows machine.

Once set up I need to alter the CLI version of php.ini to enable xdebug to work with phpstorm cli debugging.

Basically it means copying the config file from the fpm folder of the php version to the cli folder of the same php version.

Is there a way I can automate this by running a script at the end of the VM set up?

This is completely new to me and wondered if someone can guide me through what and where?

Is this in homestead.yaml? The guidance https://laravel.com/docs/9.x/homestead#extending-homestead suggests editing after.sh - can I simply put a script in there to copy the files then do fpm restart?

new to me but learning :)

0 likes
1 reply
Braunson's avatar

You may extend Homestead using the after.sh script in the root of your Homestead directory. Within this file, you may add any shell commands that are necessary to properly configure and customize your virtual machine.

Yeah put your setup scripts in after.sh which will run on the initial setup of the VM. Trial and error it and see what happens 😉

Please or to participate in this conversation.