Search code examples
laravellaravel-5vagranthomesteadvagrant-provision

How to create new site in Homestead without losing existing data?


When I create a new Laravel 5 project, I edit my Homestead.yaml, my /etc/hosts and then do:

homestead halt

homestead up --provision

That makes my new site available but I lose my database tables for ALL of my other projects on the machine and have to manually reload them from backups. I've searched around and it sounds like this is a known issue but I want to clarify that I'm not doing something stupid (which is likely).


Solution

  • I think you should try to use vagrant command instead.

    When you have your homestead machine running, try running vagrant provision in the directory where you have your Vagrantfile. It should reload the machine and your sites should be visible and any data shouldn't be removed in this case.