XAMPP and Wordpress - Slow Loading XAMPP and Wordpress - Slow Loading wordpress wordpress

XAMPP and Wordpress - Slow Loading


I've been digesting the web to find a solution for that, and it seems that it depends on your environment; in my case, it was working just fine until I installed Eclipse with Worklight.

Anyway, I just figured out how to overcome the very slow response time.

If Apache and MySQL are not installed as a service (no green checkmark beside the module name in XAMPP control panel) like this...like this...follow these steps to do so:

  1. Stop Apache and MySQL and close XAMPP
  2. Go to XAMPP location (by default c:/xampp)
  3. Right-click on xampp_start.exe > "Properties" > "Compatibility" tab; check "Run this program as an administrator"
  4. Repeat the above step with xampp_control.exe (don't run XAMPP now)
  5. Now you will be able to start mysql_start.bat and apache_start.bat
  6. Now open XAMPP (you will get a UAC alert about launching the program as administrator)
  7. You will find a red crossmark beside Apache and MySQL module, just click on the red crossmark beside each module and agree to install as service (if modules are running you have to stop them first)

This really works for me after a very long time-consuming web search with no luck at all. I hope it helps.


In your WordPress wp-config.php file, is the entry for DB_HOST ‘localhost’? If so, change it to ‘127.0.0.1’ and see if it helps.


You can try comment out the IPv6 localhost in your host file.

# ::1 localhost

Based on my previous experience, one of the most common reasons of slowness is caused by your code trying to connect to MySQL server via 'localhost', which then resolved to the IPv6 address ::1. However, for XAMPP package, MySQL server is not listening to this address by default. It only listen to the IPv4 address of 127.0.0.1. It will only try to reconnect with 127.0.0.1 after ::1 timeout.

Another option would be to amend your code to connect to MySQL server via '127.0.0.1' directly.