I’ve been having very slow PHP to MySQL connections for a while now. I’m 99% sure the issue is MySQL because when I run PHP that has no DB connection it’s fast.
I’m running WAMP on Windows 7. I’ve tried just about all the other suggestions like disable iPV6 and use 127.0.0.1 for MySQL lookups instead of localhost. The screen shot shows that I’m waiting over 12 seconds for the server to respond. The green color from the Chrome console for that request is called Time to first byte: https://developer.chrome.com/devtools/docs/network#resource-network-timing.
Has anyone come across this issue that has fixed it? It’s killing my productivity!
Apache Version :
2.4.9
PHP Version :
5.5.12
MySQL Version :
5.6.17
In the past I have noticed that if you use
127.0.0.1
instead oflocalhost
as the DB_HOST the database works faster.This applied to any use of the host name for MySQL.
So try changing this parameter in your
wp-config.php
From
To