Tag: vagrant

  • Activate Xdebug in VVV

    Activate Xdebug in VVV

    How to activate Xdebug in VVV

    From Activate Xdebug in VVV

    Running xdebug_on inside Vagrant:

    • Copy and paste output from phpinfo() to Xdebug wizard, analyze and check step about editing the php.ini file (step 9 in my case).
    • Check if /usr/lib/php/*/xdebug.so is present in the VM (it should be):
    $ ls /usr/lib/php/20170718/xdebug.so
    • Update /etc/php/*/fpm/php.ini inside the Vagrant VM according to instructions from the Xdebug wizard website.
    $ sudo tee -a /etc/php/7.2/fpm/php.ini >/dev/null <<'EOF'
     [xdebug]
     zend_extension = /usr/lib/php/20170718/xdebug.so
     EOF
    • Restart php service
    $ sudo service php7.2-fpm restart
    • Check phpinfo()–it should contain a new section for Xdebug
  • Symlinks on VVV

    Symlinks on VVV

    Trying to use outside symlinks in a WordPress environment can be a headache.

    If you are using VVV and want to create a symlink (for example, in order to have your plugins folder outside the Vagrant installation), the following is a way to do it.

    Go to your ./Vagrantfile and add the following code:

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

    Details:

    • In the ./Vagrantfile you should use the param: config.vm.synced_folder
    • The first path should point to the folder where you want to keep your plugins
    • The second path should point to the Vagrant folder that has the plugins