PHP MySQL queries slow on localhost Leave a reply To resolve that issue add the following line to your hosts file. 127.0.0.1 localhost