How to update VVV for WordPress | Varying Vagrant Vagrants
I noticed that my version of VVV or Varying Vagrant Vagrants was older than the current release and started to look into how to update VVV safely as I have done some customisations to it and added some additional files to the VVV main directory.
Move into your local VVV directory, halt vagrant and run git pull
vagrant halt
git pull
If you have changes or additions to the VVV install you will get an error…
neilg@[~/dev]:(develop) git pull Cannot pull with rebase: You have unstaged changes. Please commit or stash them.
Have a look at what the changes are by running git status
git status
So we have to run git stash first to store our changes first, this will remove them so we can sync the git repo with the later version and then we use git stash apply to bring them back. As for any added files, just don’t add them via git, leave them untracked, these along with all your sites will still be in the same location after you have successfully run git pull.
git stash
Then check if your repo is clean…
git status
Now you can pull down the later version
git pull
Then reapply your changes
git stash apply
You may get a merge conflict here, solve the conflict by looking at the file in question resolve the difference and then use git add to the file to remove the conflict.
Finally run
vagrant up --provision
Now your VVV is up to date