Backup databases: ssh into the vagrant machine and run this command: mysqldump -u homestead -psecret --all-databases > homestead-backup.sql
Log out of the vagrant machine. I copied the backup to my machine (just to be sure it is not gone after the destroy in step 4): scp -P 2222 vagrant@127.0.0.1:/home/vagrant/homestead-backup.sql .
From the directory where Homestead is installed, run the update command: vagrant box update (this may take a while, because a large file download takes place)
From the same directory: vagrant destroy
Again in this directory (assuming you have cloned the homestead repo when you installed this the first time), fetch the repo. This shows you the latest changes. Now checkout the latest tagged release using git checkout [tagname].
Start vagrant: vagrant up
ssh into the vagrant machine. If your backup file is still there, run: mysql -u homestead -psecret < homestead-backup.sql
If the file is not there, scp it from your machine using: scp -P -2222 homestead-backup.sql vagrant@127.0.0.1:/home/vagrant
Log out of the vagrant machine again and list the installed boxes: vagrant box list (I had two boxes installed, 7.0.0 and 7.1.0. The former may be removed).
Remove box 7.0.0: vagrant box remove laravel/homestead --box-version=7.0.0
If you modified the vagrant host file before the update, fix the hostfile on the vagrant machine. Ssh into the machine and open up file /etc/hosts. I had to add the IPs and urls for the applications I use as an API. The IP address and the urls can be found in the Homestead.yaml file.
Add git user info and aliases (if you had them before). Somehow they got lost as well in the update.
The problem with libpng also returned 😡. This happend when compiling my Vue based JS code with webpack.
————–
Step 5
————–
Instead of cloning new – I just updated my homestead repo with:
‘git fetch’
‘git pull origin release’
————–
Step 9
————–
I used:
‘vagrant box prune’