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

ronnyandre's avatar

How do I reinstall Homestead without data loss

This morning nginx on Homestead stopped working. service ngingx says it's running, php5-fpm is running, and everything seems fine. But trying to connect to server is impossible:

curl: (7) Failed to connect to 192.168.10.10 port 80: Operation timed out
curl: (7) Failed to connect to 192.168.10.10 port 8080: Operation timed out
curl: (7) Failed to connect to 192.168.10.10 port 8000: Operation timed out

So I guess my only option is to reinstall Homestead. But how can I do that without losing SQL data, configurations etc?

0 likes
1 reply
SamuelPB's avatar

I guess this is on a development environment?

I did this mistake once, then I started using sqlite as DB driver. Thus the file 'storage/database.sqlite' gets synced to your project folder. I also 'vagrant suspend' before shuting down in the evening and 'vagrant resume' in the morning

You can use the seeder class to repopulate your dev DB http://laravel.com/docs/5.1/seeding

Please or to participate in this conversation.