Homestead no longer drops databases on provision
Published on by Eric L. Barnes
Laravel Homestead, the official pre-packaged Vagrant box, just received a new update to the way it reprovisions the box. Previously, to add a new site you could either use the serve
shortcut from within the VM or add your new site to the yaml configuration file and then reprovision.
The problem with provisioning the box is that it would drop all your databases. This new feature prevents those from being dropped so you do not lose any data. Losing all the databases was a hassle if you use one Homestead box for all your local sites.
If you prefer the old style of dropping the databases you can run destroy
instead. That will wipe out the entire VM.
I am one of those that use one Homestead environment for everything and this is a welcome change.
For more information on Homestead see the official documentation and for more information on this change you can see the commit on Github.
Eric is the creator of Laravel News and has been covering Laravel since 2012.