vv create - creates blank folder, no htdocs, also error in nginx config
When I type
vv create
it asks all the parameters, runs provision, site folder gets created in /vagrant-local/www/, It creates blank DB.
but
There is no htdocs folder within it, no WordPress files. I have to do it manually.
Also there is an error with nginx config. I have to do vagrant ssh & edit vvv-wordpress-default-xxxxxxxxx.conf & vvv-wordpress-develop-xxxxxxxxxxx.conf to comment out following line
set $upstream {upstream];
this nginx error happens everytime I run provision.
Anything I am doing wrong here?
+1 Need to manually run vvv-init.sh in the new directory.
It runs with no noticeable errors, updates wordpress-default, wordpress-develop, then:
- reports some warnings at "Installing local npm packages for src.wordpress-develop.dev, this may take several minutes."
- aborts the "Initializing grunt and creating build.wordpress-develop.dev, this may take several minutes." task
and at the nginx restart:
==> default: nginx: [emerg] directive "set" is not terminated by ";" in /etc/nginx/custom-sites/vvv-auto-wordpress-default-provisioner-provision-1b771c7975e79d255ff8985e481a2a12.conf:17
==> default: nginx: configuration file /etc/nginx/nginx.conf test failed
After running vvv-init.sh in the new directory, everything seems fine. Didn't have to touch nginx.
Following, also getting the same issue.
Same issue here. No htdocs folder and empty DB.
Same here, no htdocs and empty DB. Need to manually run the vvv-init.
I had the same thing happen. I then added my site directory to the "sites:" object in "vvv-config.yml" like
sites:
(...default site provisioners here...)
wordpress-default:
(blank after the colon) and ran a "vagrant up --provision" and it picked up the vvv-init and downloaded the latest WordPress and installed it.
However, sites I have setup this way no longer seem to have their database backed up when I do a "vagrant halt". I'm not sure if there are any issues with this method.
vv --debug-vv results in the following:
`/usr/local/bin/vv: line 1481: version: command not found
vv: /usr/local/bin/vv
vv_config: /Users/mark/.vv-config vvv path: /Volumes/MacDev/vagrant-local home: /Users/mark
tput: cat: /bin/cat curl: /usr/bin/curl brew: /usr/local/bin/brew tar: /usr/bin/tar find: /usr/bin/find git: /usr/local/bin/git sed: /usr/bin/sed paste: /usr/bin/paste vagrant: /usr/local/bin/vagrant
iMac:vagrant-local mark$ `
code from that file:
`__vv__output_debug_vv() { echo "----------" version echo "" echo "vv: $(which vv)" echo "" echo "vv_config: $vv_config" echo "vvv path: $path" echo "home: $home" echo "" echo "tput: $(whichtput 2>/dev/null)" echo "cat: $(which cat)" echo "curl: $(which curl)" echo "brew: $(which brew)" echo "tar: $(which tar)" echo "find: $(which find)" echo "git: $(which git)" echo "sed: $(which sed)" echo "paste: $(which paste)" echo "vagrant: $(which vagrant)"
echo "----------"
}`
Same here.
When I cd into
Installing WordPress (release version) in www.mysite.be/htdocs...
./vvv-init.sh: line 7: wp: command not found
./vvv-init.sh: line 8: wp: command not found
./vvv-init.sh: line 14: wp: command not found
Did I somehow miss a step in my setup or is this related to the issue mentioned above?
@jversmis I initially did try running the init script directly using "vagrant ssh" to ssh into the box itself rather than run it from my local computer -- were you using SSH? However, it seemed to set a site up better better when I used the approach in my previous comment.
@vikcon that Nginix error went away for me during creation after I updated VVV with a git pull (had to stash and merge my vagrantfile during the update).
I'm having the same exact issue as @jversmis
Did exact same as @jversmis Then ended up here...
@blairworks I was running the script from my local machine.
any solution for this ? i have the same problem . if i go in vagrant ssh there is an update , ill try to do that and see if it helps
I was having the same problem using VVV version 1.4. I downgraded to 1.3. Problem solved. It appears they've changed the provisioning.
@blairworks I can confirm that ssh'ing into the vagrant box and running the script there works.
In fact, this seems to be the most logical way of working. Why would you put up a vagrant box and run scripts which require a tool (wp) on you host machine? I don't know why I didn't think of that yesterday :-)
@jversmis That is great news. Now, what I've understood from browsing at VVV lately is that with the new provisioning system, you are supposed to add the site, like in my previous comment, to a copy of "vvv-config.yml" that has been saved at "vvv-custom.yml".
If you do that as a last step after adding the site via "vv create", then it should run the script during the next "vagrant up --provision". With this method, you don't need to actually go in via "vagrant ssh" and run it manually (I'm not sure if running it manually has any drawbacks).
I do still have a problem though that my new sites no longer seem to have their database backed up when I do a "vagrant halt" (but the old ones do....). If you are running the triggers plugin, I'd be curious to know if you have run into the same problem. I can't figure out what the difference between the old and new sites are that is causing this different behavior -- it is very strange.
OK - I've learned a few key things:
- I am on the "develop" branch and was not aware. It uses the new provisioner. You might want to check and see what branch you are on if you are having this problem. As of this time, the current release of VVV is 1.4.
- With the new provisioner, it seems to work with Variable VVV as long as you add your site to the sites object in a copy of "vvv-config.yml" that has been saved at "vvv-custom.yml". If I have done so, and then do "vv create", everything behaves as expected and there is no empty folder.
- My issue with the backups ended up being a quirk. Certain database names are filtered out of the list of databases to dump. My sites/databases had the word "test" as part of the name... Any database with the the name "test" within is automatically excluded from the backup, probably trying to filter out sample databases and the like. You can see what other names are filtered out by the dump script.
I also have the same exact issue as @jversmis
So I think I'm jumping in late here. I have some similar problems and was hoping to help some out. Like @blairworks my VVV was on the "develop" branch. I switched to the "master" branch and that seemed to fix my empty folder issue.
I know get this error:
==> default: nginx: [emerg] directive "root" is not terminated by ";" in /etc/nginx/custom-sites/vvv-auto-wordpress-default-provisioner-provision-1b771c7975e79d255ff8985e481a2a12.conf:12 ==> default: nginx: configuration file /etc/nginx/nginx.conf test failed
I did "vagrant ssh" and then nano edited the file to no avail. It sounds similar to the original problem @vikcon was having. Does anyone know what I should edit in that file, or what I should comment out?
I can't seem to get this to work properly and am stuck.
@erikdmitchell I don't think 'master' is necessarily stable either. As of this moment, the stable release is the tagged release 1.4.1:
https://github.com/Varying-Vagrant-Vagrants/VVV/releases/latest
It might be safer to clone that tag if you want a stable version.
If instead you want to try another crack at "develop", this blog post supporting the upcoming VVV 2.0 goes into more detail about how the new provisioner configuration works. I'm staying on the develop branch myself, until the 2.0 release so that I can take advantage of this more powerful provisioner. Basically, all this means and just adding the new site to the sites object. As long as I have done that, Variable VVV seems to provision WordPress properly.
@blairworks Master is 1.4.1 and is verry stable
The problem only exists if you try to move from develop back down to master.