Having symbolic links in Varying-Vagrant-Vagrants (VVV) shared folders

I am currently using Varying-Vagrant-Vagrants to set up a local WordPress development environment on my Macbook Pro.

VVV creates separate hosts (default, development, trunk, etc.) and has corresponding shared folders created inside the folder /www

.

$ tree -L 1 www
www
├── default
├── phpcs
├── vvv-hosts
├── wordpress-default
├── wordpress-develop
├── wordpress-trunk
└── wp-cli

      

Instead of copying my current plugin to all three WordPress installation plugin folders, I had to use a symlink.

Assuming my plugin code is in ~/Dropbox/code/my-plugin

, I want to create symbolic links in the following locations

  • wordpress-default/wp-content/plugins/my-plugin

  • wordpress-develop/wp-content/plugins/my-plugin

  • wordpress-trunk/wp-content/plugins/my-plugin

The problem with this approach is that when these folders appear inside the vm, the symlink still points to a location in the host os, which is not accessible inside the vm. Is there any alternative to this?

I've already checked this answer from another question that deals with vagrants (not VVV specific), but which doesn't seem to work.

+3


source to share


1 answer


I finally did it by creating a new shared folder. If anyone is interested then this is what I added to my own Customfile

.

if vagrant_version >= "1.3.0"
  config.vm.synced_folder "/Users/sudar/Dropbox/plugins/", "/srv/www/wordpress-default/wp-content/plugins", :owner => "www-data", :mount_options => [ "dmode=775", "fmode=774" ]
else
  config.vm.synced_folder "/Users/sudar/Dropbox/plugins/", "/srv/www/wordpress-default/wp-content/plugins", :owner => "www-data", :extra => 'dmode=775,fmode=774'
end

      



Update . I also wrote a blog post explaining my setup as several people have asked about it.

+4


source







All Articles