Search code examples
phpvagranthomesteadphp-inivagrant-provision

Change PHP ini values using provisioning


What is the best way to change PHP ini values when provisioning a Homestead box?

E.g. I want to change the value of display_startup_errors to On.

Would you find/replace the value in the php.ini file using sed?

Do I just put the commands in after.sh or is it better to use config.vm.provision "shell"?


Solution

  • Do this with sed via after.sh. That's exactly what that script is for. That way you don't have to worry about changing any files that Homestead may overwrite in a future update.