Vvv: How to properly remove a site?

Created on 13 Aug 2017  路  5Comments  路  Source: Varying-Vagrant-Vagrants/VVV

I've searched the web a decent amount, read a bit about provisioning, etc, and I for the life of me can't figure out how to remove a site.

I've learned that vvv-custom.yml is where I add new sites (then provision, which I do with the vvv-base repository). I believe if I define the "hosts" section of the site in vvv-custom.yml, I can determine the local url (such as local.example-site.dev), but still need to confirm this. That being said, I have ZERO idea how to properly remove a site, and manually deleting a directory from the www folder, or altering the hosts line, gave me wrecked results, mostly pertaining to nginx starting up, and failing (files not existing from the removed directory). This tells me somewhere else is storing the sites created, but I don't know where that is.

So in short, how on earth do I completely delete a newly added site from vvv-custom.yml? If there's any reading that clears up what exactly is happening here, I'm more than up for reading it, I just haven't found anything that really makes things clear.

support

Most helpful comment

@nelga That should do the trick, if you remove it from vvv-custom.yml, delete the folder, then reprovision, nothing should remain of the site. If this is not the case, what persisted that shouldn't have? If it's just the database that persisted, then you can either destroy the box and rebuild it via vagrant halt; vagrant destroy; vagrant up --provision, or just go into PHPMyAdmin and remove the database

If the whole point of this is to make provisioning faster, just add the skip_provisioning: true parameter to the site.

As a sidenote, the new dashboard mentions that re-provisioning on config changes is necessary in a few places so that part is clearer

All 5 comments

Yes, anything you add in the hosts section of a site will direct the browser to that site, assuming the site is set up to accept it

As for removing a site, remove it or comment it out from the config file, then re-provision ( _always reprovision when that file changes, no exceptions_ ).

Once this is done, you can remove the folder. You don't remove car engine parts while you're hurtling down the freeway/motorway, you stop the car first, the same is true of VVV. Modifying things while they're still running can lead to unexpected things

Thanks for the response, that got me where I needed to be.

As for removing a site, remove it or comment it out from the config file, then re-provision ( always reprovision when that file changes, no exceptions ).

That was not made clear from what I've read, and is a must-know for those new to the technology.

Is anyone able to please outline how to remove or restore a site (and it's database, and anything else related) in VVV 2.0? Removing the site from the vvv-custom.yml and then deleting the folder + database backup doesn't seem to do it. Is there something I'm missing?

@nelga That should do the trick, if you remove it from vvv-custom.yml, delete the folder, then reprovision, nothing should remain of the site. If this is not the case, what persisted that shouldn't have? If it's just the database that persisted, then you can either destroy the box and rebuild it via vagrant halt; vagrant destroy; vagrant up --provision, or just go into PHPMyAdmin and remove the database

If the whole point of this is to make provisioning faster, just add the skip_provisioning: true parameter to the site.

As a sidenote, the new dashboard mentions that re-provisioning on config changes is necessary in a few places so that part is clearer

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

Related issues

JDGrimes picture JDGrimes  路  4Comments

rwrobe picture rwrobe  路  4Comments

westonruter picture westonruter  路  6Comments

dingo-d picture dingo-d  路  3Comments

joelworsham picture joelworsham  路  5Comments