Vagrant, shared folders, symbolic links

I’ve struggled to set up a Vagrant environment to test and finally package tAD libraries into a proper WordPress plugin.
The reason of my struggle is that symbolic linking will not work in synchronized folders in Vagrant. This means that my idea of a central folder of plugins and themes symbolically linked to the synced folders of each vagrant virtual machine is not possible.

It’s a common problem

During my google-searching for a solution it seemed clear to me that the problem is a common one, often solved avoiding it and sometimes solved the proper way.

The proper way did not work for me

I’ve used PuPHPet to up all my machines and the proposed solution did not work. Any plugin folder I try to symlink into a virtual machine WordPress installation plugins folder simply does not appear.

Just one
Just one

Two here
Two here

While copying and pasting the whole plugin folder into said folder will make the plugin appear.
Two now
Two now

A better alternative?

I’ve stumbled on VVV and I’m giving that a try. This means losing Vagrant power of testing code against different server solutions, PHP versions and OSes but I guess WordPress is an abstraction from the server layer enough to deem that a little loss. WordPress theme and plugin development in mind that more specialised solution might be a better solution in the long run.

4 thoughts on “Vagrant, shared folders, symbolic links

  1. I’ve used VVV before and I tried a similar sym linking model and was unsuccessful. I have all my sites in a Sites folder, then I would have a symlink from the VVV docroot to the directory within my Sites folder, but it wouldn’t recognize that.

    I’m curious to find out if you were successful in your quest, as it’s a quest alot of us are on.

    1. Total failure for me too until now.
      I’ve humbly given up after a while seeing how much time I was investing in the struggle, it’s comforting to know I’m not alone.

I appreciate your input