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 resolve localhost
: 127.0.0.1 localhost
- Disable IPv6
- Replace all occurrences of
localhost
in your configuration files (for Apache, MySQL, and PHP) with 127.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).
You 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.
– harrymc – 2013-11-16T16:23:42.150Thanks @harrymc. Sure I will go through the Answer you suggested in link. – NullPointer – 2013-11-18T04:19:11.153
I’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? – Synetech – 2013-11-19T20:50:28.947@Synetech, Yes. PHP as an Apache Module like following entry in httpd.conf file
LoadModule php5_module
– NullPointer – 2013-11-20T04:13:19.410I’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. – Synetech – 2013-11-22T01:27:37.357