0

How can I get my scripts in data folder synced to the wordpress themes folder?

Currently I've got it set from this:

  config.vm.synced_folder "./data", "/vagrant_data"

to this:

config.vm.synced_folder "data", "/var/www/public_html/wpthemes/wp-content/themes/UberBasic/"

But its not working.

0

You need to have VirtualBox guest additions installed in the box your are using to get this working.

If you are using default boxes like debian/stretch64, it does not include VirtualBox guest additions, so you need to install it manually.

To do so you need : * to add guest addition iso cdrom in VirtualBox GUI and mount it

VirtualBoxGUI

In your console/terminal :

vagrant up
vagrant ssh
mkdir /opt/tempdir
mount /dev/sr0 /opt/tempdir
sudo apt-get install -y linux-headers-amd64 build-essentials
sudo ./VBoxLinuxAdditions.run
rm -fr /opt/tempdir

You need to shutdown the vm, modify the Vagrantfile to allow synced folder :

config.vm.synced_folder "data", "/var/www/public_html/wpthemes/wp-content/themes/UberBasic/"

You can start your vm with vagrant up. After that you will have a full synced folder between vagrant host and guest.

Be aware that if you use vagrant destroy, you will have to repeat all from the beginning.

Or you can also use a Vagrant box with VB guest additions embedded which is more simpler.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.