Vvv: Upgrade VVV

Created on 9 Mar 2016  Â·  15Comments  Â·  Source: Varying-Vagrant-Vagrants/VVV

What is the correct procedure to upgrade VVV to its latest edition?

documentation vvv.org

Most helpful comment

So this is what the docs would say, and these are comprehensive instructions:

  1. Don't fork the VVV repo itself unless you're intending to contribute via Pull Requests
  2. Fork sites, not VVV
  3. vagrant halt
  4. Make sure your vagrant and virtualbox are up to date. If necessary, download a new vagrant, use the uninstall tool and install a fresh copy
  5. Run vagrant box update ( optional but probably for the best )
  6. git pull if you used git

    1. if you downloaded instead though, download and extract a new copy of VVV over the top. Make sure that your existing sites in www aren't overwritten, and you have DB backups

    2. If you used git you should be fine, as long as you had vagrant triggers

  7. Now your copy of VVV is up to date
  8. Run vagrant up --provision to update the box and bring it up

Keep in mind that if you regularly update, git pull; vagrant reload --provision should do just fine.

I'll get to work adding a page to the docs

All 15 comments

Good question. One I was wondering yesterday. I ended up nuking vagrant and starting from scratch because it was out of date too. Use git? I honestly don't know if that's the right answer or not.

I just do a git pull and after that a vagrant up -provision

I was wondering the same thing, since I was going through and upgrading all my Git, Node.js, Homebrew, BrowserSync, VirtualBox, Vagrant, etc. installs because I am creating a new WordPress theme based on Underscores and Zurb Foundation for a client.

I did some searching on Google and didn't find any mention of how to properly upgrade your VVV environment. I looked at my local VVV "CHANGELOG.md" and it said I was still on 1.2.0 from December 14, 2014, which was out of date.

After running across this issue and comments I decided to try upgrading my environment using @cfoellmann suggestion above. Before doing this I made a copy of my full "VVV" directory I have on my local machine to another directory for safe keeping. My VVV folder is located under "DocumentsVVV", but your directory might be "vagrant-local" if you followed the VVV install instructions directly.

I use the GitHub Desktop for managing my Git repositories, so I synced the "VVV" respository by clicking "Sync" in the desktop client. This is the same as running the git pull command in your local "VVV" directory.

Next I tried vagrant up -provision command mentioned by @cfoellmann, but it didn't work. I then tried running just vagrant up and it kind of worked, but I received an error when it got to the Executing command "vagrant ssh -c vagrant_up" section. I could still get to my local development sites, but the error bugged me and I wondered what else might be incorrect. I then ran the vagrant halt command to shut down my VVV virtual machine and did some more research.

I went to https://www.vagrantup.com/docs/cli/up.html and realized the command should be vagrant up --provision with two dashes instead of one. I started VVV again, but this time by typing vagrant up --provision and it forced the provisioners to re-run. This time Vagrant downloaded everything the new version of VVV needed and finished booting correctly without any errors.

I checked the "CHANGELOG.md" file and it says I have VVV version 1.3.0 from February 21, 2016. My development sites are also still right where I left them before the upgrade and working as expected.

If this isn't the correct way to upgrade your VVV installation, please let us know, but it looks like everything is working in my environment after using the git pull and vagrant up --provision commands mentioned above.

Well said Christopher. You spelled out exactly what I meant by "use git".

I would be willing to turn that into a starter wiki page called like "Updating VVV" with someone's blessing and a bit more information:

Because I'm not always using VVV - or even Vagrant for that matter - when it comes time to fire it up stuff's frequently not been looked at for some time. It's my personal inclination to include information about updating Vagrant as well - or to include any disclosures around what version vagrant should be running/avoided, and at what point in the process a vagrant update should happen.

Any other steps anyone think should be included? I'm not into all that fancy-pants Gulp/Grunt stuff.

@cnc137 I am sorry my typo cost you some time to debug

+1, it would be great to have some better documentation on this process. In most cases, git pull && vagrant provision should do the trick, but it can sometimes be hard to guarantee that.

Thanks for this tutorial, works great.

Just a little addon for Windows users wantint to upgrade their VirtualBox along the way:
You may end up getting an _error related to VirtualBox's network adapters_ during the first vagrant up after the VVV upgrade. I was able to resolve the issue by changing network adapter properties (on Windows network adapters settings screen) thanks to the VirtualBox forums reply.

Thanks a billion for this Issue. I was running everything outdated and didn't realize it until I tried to use a WP-CLI command that didn't exist in my current version.

git pull && vagrant up --provision worked fantastic for upgrading VVV and then upgraded all the neat stuff that comes with it.

For the sake of completeness, I also upgraded Virtual Box (by going to their site and downloading/installing latest version), Vagrant itself (by going to their site and downloading/installing latest version), upgraded the vagrant box with vagrant box update and upgraded Variable VVV with vv --update

Thanks for all info in this thread, really got me on track.

I had an additional problem: my 'vagrant-local' folder wasn't cloned from github but instead downloaded and the put on my (windows) system.

I found https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
I did manage to get it updated with these steps (loosely following the tutorial mentioned)

  • go to 'vagrant-local' folder
  • git init
  • git add .
  • git commit -m "some message"
  • git remote add origin https://github.com/Varying-Vagrant-Vagrants/VVV.git
  • git pull origin master --allow-unrelated-histories
  • git checkout --theirs ./* (or individual files/folders etc)
  • git add .
  • git commit -m "some message again"

Just checked my vvv version and it is up and running on 1.4.0 now, updated from 1.2.0.
All my projects work as well :)

Thanks!

So this is what the docs would say, and these are comprehensive instructions:

  1. Don't fork the VVV repo itself unless you're intending to contribute via Pull Requests
  2. Fork sites, not VVV
  3. vagrant halt
  4. Make sure your vagrant and virtualbox are up to date. If necessary, download a new vagrant, use the uninstall tool and install a fresh copy
  5. Run vagrant box update ( optional but probably for the best )
  6. git pull if you used git

    1. if you downloaded instead though, download and extract a new copy of VVV over the top. Make sure that your existing sites in www aren't overwritten, and you have DB backups

    2. If you used git you should be fine, as long as you had vagrant triggers

  7. Now your copy of VVV is up to date
  8. Run vagrant up --provision to update the box and bring it up

Keep in mind that if you regularly update, git pull; vagrant reload --provision should do just fine.

I'll get to work adding a page to the docs

@tomjn were these instructions ever added to the documentation? If so, can you link that page to me? I couldn't find it with a cursory search. If not, can I still use these instructions to keep my VVV (and related components) up to date?

No idea, git pull and reprovision to update VVV
On Sat, 21 Jul 2018 at 13:57, cagross notifications@github.com wrote:

@tomjn https://github.com/tomjn were these instructions ever added to
the documentation? If so, can you link that page to me? I couldn't find it
with a cursory search. If not, can I still use these instructions to keep
my VVV (and related components) up to date?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Varying-Vagrant-Vagrants/VVV/issues/845#issuecomment-406795111,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADl5zm1Pkm3w0zRJhIQH-fihv-eBOANks5uIyU5gaJpZM4HsrA7
.

@gbot OK yes I see--thanks for that.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings