php – WAMP is running very slow-ThrowExceptions

Exception or error:

I am using WAMP (localhost) on Windows 7.

When I am running my localhost it takes more than 1 minute to load the page. There are no queries or database connectivity. If it’s just an HTML page, it also takes the same time, and if the Internet is connected it works normally.
If Internet is connected it works perfectly. When the Internet is not available it takes more than 1 minutes to load a simple page.

How can I fix this?

How to solve:

The solution that worked for me was to disable the cgi_module. Use one of these methods:

(Method 1) Left click on WAMP > Apache > Apache Modules > uncheck “cgi_module”

(Method 2) Edit httpd.conf and disable the loading of the CGI module by commenting this line:

LoadModule cgi_module modules/

Commenting would be just adding a # in front, like this:

#LoadModule cgi_module modules/

Restart the Apache service and you should be good to go.


Set mysql_connect(‘’… instead of mysql_connect(‘localhost’….

WAMP/XAMPP is responding very slow over localhost


I tried a lot of the answers on here without much success. It was PHP itself where the bottleneck was occurring. I disabled Xdebug and my page-load time went from ~1200 ms to ~275 ms. That was where the biggest single gain occurred, by far.


Instead of using the hostname “localhost”, use an IP address in your MySQL connection string.

Typically, your WAMP installation is found in C:\wamp.
Edit this file with Notepad:



define("DB_HOST", "localhost");


define("DB_HOST", "");

Restart the WAMP services.

You can check out more details on this website.


Changing the PHP SMTP server in file php.ini from localhost to, on line 1084 in my vanilla copy, did the trick.


Accessing my local content on instead of localhost worked for me (so probably a DNS resolve issue is hidden somewhere):

  • is fast

  • http://localhost/mysite is slow


My problem was of a smaller scale. An empty PHP page went from almost instant rendering to about 1 second.

It turned out that my Xdebug settings were causing the problem. I had xdebug.remote_enable=on set in the php.ini file, and this was causing the delay. Before I was starting, the debug session was using an idekey, so I only got the delay when starting a debug session. Commenting the line out solved the problem.


Uncommenting this line in the hosts file worked for me:

# 'localhost' name resolution is handled within DNS itself.       localhost
#   ::1             localhost

Uncommenting 127.0.01 localhost. And after that it’s super fast.


I’m running Windows 8, and WAMP was very slow. I did all suggested before. With a difference; WAMP had httpd.conf by default:

AcceptFilter http none
AcceptFilter https none

So I did the contrary thinking: Maybe this is not needed any more. It seems to work fine:

 #AcceptFilter http none
 #AcceptFilter https none

Maybe is not a problem in all Windows versions. In httpd you read:

# AcceptFilter: On Windows, none uses accept() rather than AcceptEx() and
# will not recycle sockets between connections. This is useful for network
# adapters with broken driver support, as well as some virtual network
# providers such as vpn drivers, or spam, virus or spyware filters.
#AcceptFilter http none
#AcceptFilter https none


Here is a list of changes I made to make WAMP faster in my Windows 10 Pro 64 bit:

  1. Edited hosts file and added: localhost
  2. Edited hosts file and added: myVhosts (note: I added all other entries in the same line as the first one. I don’t create multiple lines to point to different places. So I only have one and then next to it, any vhosts or anything else that I want to point to it)
  3. Edited my.ini and added: bind-address="" (below [wampmysqld64])
  4. Disabled cgi_module from Apache** → Apache Modulescgi_module (uncheck it)
  5. Disabled XDEBUG Extension from php.ini
  6. As I have Anti-Virus and Firewall, added httpd.exe and mysqld.exe files (as well as PHP CLI and CGI binaries, and PHP’s DLL files) to the exceptions.
  7. Turned on EnableMMAP and EnableSendfile in httpd.conf
  8. Set realpath_cache_size to 4096k in php.ini
  9. In the end, edited the configuration file of projects and replaced the localhost with as well.

I also recommend checking this article: WAMP is Running Very Slow. They covered a lot of changes that may help you as well.


This issue was plaguing me after I upgraded WAMP Server from 2.2 to 2.4.

I eventually found the solution, as detailed in this blog post:
Apache server 2.4.6 hangs after serving requests from Internet Explorer 10/11

Add the following to Apache’s configuration file (httpd.conf):

AcceptFilter http none
AcceptFilter https none


This may sound really simple, but if you are using Notepad++’s menu RunLaunch in <browser> option (e.g. Launch in Firefox), it loads as file:///C:/wamp/www/dynamic/index.php instead of localhost/dynamic/index.php.

If this is the case then try going to localhost/dynamic/index.php in the URL bar on your own, and it will load much faster.


I ran into this issue specifically in Chrome. Emptying the browser cache completely solved it.


In my case the slowness was because I was on a corporate VPN and also had a proxy URL set in Chrome. Off the VPN everything loaded fast.

To get things to work on the VPN, I removed the proxy setting from Chrome. Things mostly worked then, but a search for WordPress plugins or themes from the dashboard still failed.

I added the following to wp-config.php and then search worked too:

 /** proxy settings */
 define('WP_PROXY_HOST', '');
 define('WP_PROXY_PORT', '1234');
 define('WP_PROXY_USERNAME', '');
 define('WP_PROXY_PASSWORD', '');
 define('WP_PROXY_BYPASS_HOSTS', 'localhost');


Turning off the cgi_module also worked for me with WAMP + WordPress. I wanted to share that you can also do this with the WYSIWYG in WampServer 2.5.

  • Click on the WAMP Quick Launch Icon in the Taskbar.
  • Hover over ApacheApache Modules
  • Click to remove the check mark from cgi_module

WAMP should restart itself, and you should see the speed pick up.


I ran into the same problem and changed all the options mentioned.

After that, I saw that a Drupal database with extreme weight was causing the problem. Clearing the watchdog table and cache solved the problem.


Adding to tvanc’s answer, also disable the Xdebug profiler in php.ini with xdebug.profiler_enable=Off or xdebug.profiler_enable=0.

You might also increase the PHP memory limit. Search for memory_limit in php.ini.

There are also some useful tips at WAMP is Running Very Slow which are too numerous to list here.


I tried everything, and nothing worked. Then I found out by removing all session references WAMP was 20 times faster. As the sessions were being locked, so when the same application requested multiple pages it was super slow.


I followed all these and the links with no joy. Gold for my Wamp v7.3.16-2 was setting
in MySQL’s my.ini file. Response time went from minimum of 2 seconds to zero.

Thanks to


I’ve found that it somehow helps a lot not to reload the page, but rather go to another page, and click the link (if it it exists) to the previous page

I do this, since I have a menu bar, so I just click another link, and then back.


This only solves the problem for some time. After a while it becomes slow again.


Run WAMP only. Quit other applications which use the Internet.


Add as your DNS in Use the following DNS server addressesPreferred DNS server

Leave a Reply

Your email address will not be published. Required fields are marked *