Dealing with slow outbound connections in Vagrant hosted WordPress

Jan 20, 2015 08:46 · 63 words · 1 minute read

When I started working with WordPress on Vagrant yesterday I noticed that it was very slow. Turns out it was due to how Vagrant and VirtualBox were dealing with DNS. It also turned out to be an easy fix. I just needed the following in my Vagrantfile:

config.vm.provider "virtualbox" do |v| 
    v.customize ['modifyvm', :id, '--natdnshostresolver1', 'on'] 
    v.customize ['modifyvm', :id, '--natdnsproxy1', 'on'] 
end