Wamp's localhost taking so much time on opening
I had this issue as well and while looking for a solution, I read several pages with advice on fixing this it. (1), (2), (3), (4).
There are several suggestions, but the general consensus seems to be that the two most effective fixes are the following:
- Changing PHP to be run as an Apache module or as a Fast-CGI process (I have seen both suggested as being faster)
- Adding a line to the
HOSTS
file to resolvelocalhost
:127.0.0.1 localhost
- Disable IPv6
- Replace all occurrences of
localhost
in your configuration files (for Apache, MySQL, and PHP) with127.0.0.1
I ended up adding a registry entry to disable IPv6, but I have not rebooted yet, and moreover, I had already disabled it through the normal Windows interface settings, so I don’t think it has had any effect yet.
I also replaced localhost
with 127.0.0.1
in my configuration files which seems to have had the most effect, bringing my WordPress page-loading times down from ~7 seconds down to ~2 seconds.
In addition, I also performed a test whereby I started the dnscache
service (after replacing my normal, large hosts
file with a tiny one of course). That seems to have drastically increased all browsing performance (which means I now have to find a way to get around the 100%-CPU load that the service creates with a large hosts
file).
Related videos on Youtube
NullPointer
It's a fun :) when working with computers and programming but sometimes it's scary :( too. profile for NullPointer on Stack Exchange, a network of free, community-driven Q&A sites http://stackexchange.com/users/flair/2476406.png
Updated on September 18, 2022Comments
-
NullPointer over 1 year
I have following configuration for
WAMP
on local machineWindows 7
.When I try to open
localhost
fromWAMP
Notification icon, it's taking so much time (around in minutes). Evenphpmyadmin
is taking so much time.Any idea that How to resolve this?
-
harrymc over 10 yearsYou can find a collection of workarounds in this answer. It would be useful to try them out and add some comments regarding your (lack of) success into your post.
-
NullPointer over 10 yearsThanks @harrymc. Sure I will go through the Answer you suggested in link.
-
Synetech over 10 yearsI’ve been having a similar problem with my homemade WAMP stack. Mine isn’t quite that slow, but it’s slow enough that using WordPress becomes sufficiently frustrating that I can’t just open a browser window, click a link, then type up an article when I get an idea for one; I end up putting them in text-files for batch-entry later on. In my case, I strongly suspect that the problem is because I am using a FastCGI version of PHP because I was lead to believe that it was faster. Go figure. What’s your configuration? Do you get instances of
php-cgi.exe
running or is your PHP an Apache module? -
NullPointer over 10 years@Synetech, Yes. PHP as an Apache Module like following entry in httpd.conf file
LoadModule php5_module
-
Synetech over 10 yearsI’ve read advice about improving performance by changing PHP to load as a Fast-CGI process as well as changing to load as an Apache module. This mutually exclusive advice isn’t particularly useful. Personally, I currently have it running as FCGI, but that means that you cannot set PHP directives in an
.htaccess
file per-directory, so I’m going to change it back to an Apache module.
-
-
NullPointer over 10 yearsA am appreciating your answer :)
-
Synetech over 10 yearsHappy to help. Let me know what your results are. If it doesn’t work, then we can try some of the other suggestions.