What is the proper way to refresh Homestead after making changes to the Homestead.yaml file Hi,
I have noticed that if I add a new site to my Homestead.yaml file the changes do not take effect immediately.
What is the proper way to refresh Homestead after making changes to the Homestead.yaml file?
Thanks
I agree, this is not 100% clear.
I always call 'vagrant global-status' to get the Id of my homestead machine, then call 'vagrant provision [id]' to redo the provisioner.
After quite some time researching for a solution for this, I came upon this Vagrant command:
vagrant reload --provision
It will restart your homestead machine and apply the changes you made, while keeping your database data intact.
It looks like there is not a consistent process. Sometimes it works just by doing homestead provision but sometimes I need to do what @aarondfrancis suggested, run vagrant global-status to get the Id and then run vagrant provision [id]. In some cases I actually need to do all that plus reboot homestead with homestead halt and homestead up.
@fsdolphin That sounds like too much work, have you tried running vagrant reload --provision? , it never failed me.
I actually did but it didn't seem to do the refresh. I will give it another try to see what happens, I need to find the best option.
FYI -
I just tried vagrant reload --provision after adding a new site to my .yaml file and it didn't do the refresh.
This is what I see when I typed it.
default: VM not created. Moving on...
Stick with using the serve helper function from within the homestead VM. Guaranteed to work every time :)
@deringer
So you just type serve or homestead serve?
I don't see any options or commands in the homestead list.
create an alias for homestead (latest version or 3.0.2) command on your .bash_profile, or .bashrc or .zshrc
alias homestead='function __homestead() { (cd ~/Homestead && vagrant $*); unset -f __homestead; }; __homestead'
don't forget to reload it (source command). You can run homestead provision to reload homestead configuration after updating your Homestead.yaml file
Please sign in or create an account to participate in this conversation.