Dec 24, 2012

Apache, PHP, MySQL slow under Windows 8. How to fix.


I recently escaped from Apple based computers to go back to normal laptops. I purchased a very powerful Lenovo ThinkPad W530. It is a war machine. I am so happy and satisfied with it that I will even keep Windows 8 Professional for a while. I will then switch back to my beloved GNU/Linux as well.
Meanwhile, I still have to accomplish many development task, some of which are classic web development (read: PHP, MySQL, and Apache).

There are so many WAMP solutions for Windows 7 (e.g., WampServer, Bitnami stacks, and EasyPHP). While many of them will work on Windows 8 without issues, XAMPP is Windows 8-ready.

Unfortunately, I encountered a widely reported issue. Apache PHP, MySQL are slow under Windows.. Terribly slow. Sometimes, even slower than deployed websites on the Internet. I had to wait from 3 to 10 seconds just to load a local WordPress website.

In this short post, I summarize all the proposed fixes and report which one really solved my problem.
The following are only a small part of the proposed fixes to solve WAMP slowness under Windows 7 and Windows 8:

  1. Exclude Apache, PHP, and MySQL from your Firewall checks.
  2. Add Apache, PHP, and MySQL executables, and the Website Folders as exceptions of your Antivirus.
  3. Make sure you are loading PHP as an Apache module rather than using CGI methods.
  4. Tune php.ini.
  5. Disable xdebug extension.
  6. Disable IPv6.
  7. Make sure that Apache only listen to IPv4 as well.
  8. Setup a proper hosts file: disable IPv6 localhost, enable the IPv4 localhost counterpart, and make sure to do the same for all your VirtualHosts, if any.
  9. Employ Voodoo-like tunnelling systems.

I did all of them without any reasonable improvement. Sure, they might all help after applying the only fix which worked for me.

Do you want to know what really fixed the issue for me? Promise you will not laugh.

I mostly worked on GNU/Linux in the last 10 years. Somehow, I employed OS X as well. Unfortunately, I am not a Windows power user. I don’t seriously use Windows since XP.

Today, I discovered that there is a serious difference between the “Balanced” and the “High Performance” power plans of Windows.
This difference is still strong when not using the battery (that is, power cable plugged). While GNU/Linux and OS X somehow unleash the beasts living in our laptops when the power cable is plugged, Windows on my Lenovo did not. It still was limiting CPU scaling capabilities and keeping it as much low as possible.

Either switching to “High Performance” power plan or customizing the “Balanced” plan settings solved the issue for me. In particular, I think that bringing the “Minimum Processor State” option from 5% to 80% does the trick. You can bring it to 100% if it doesn’t make your laptop lift-off.
Additionally, I (finally!) stopped complaining how Windows 8 was still slow when opening Google Chrome, IntelliJ Idea, or the File Explorer itself despite using a SSD drive. Comparing to GNU/Linux, the difference was huge. Now it is no more.

I feel a little dumb. However, we never stop learning and I am happy to share this experience.

written by dgraziotin

Dr. Daniel Graziotin received his PhD in computer science, software engineering at the Free University of Bozen-Bolzano, Italy. His research interests include human aspects in empirical software engineering with psychological measurements, Web engineering, and open science. He researches, publishes, and reviews for venues in software engineering, human-computer interaction, and psychology. Daniel is the founder of the psychoempirical software engineering discipline and guidelines. He is associate editor at the Journal of Open Research Software, academic editor at the Research Ideas and Outcomes (RIO) journal, and academic editor at the Open Communications in Computer Science journal. He is the local coordinator of the Italian Open science local group for the Open Knowledge Foundation. He is a member of ACM, SIGSOFT, and IEEE.

  • Brent Apr 2, 2013 Reply

    I have a powerful ASUS gaming machine running Windows 8 that I use for development, and running a WAMP set up was really slow. I tried step 6, disabling IPv6. Works brilliantly.

    Thank you so much for sharing your experience. It has fixed my problems.


    • Dean Apr 6, 2013 Reply

      Just tried that and it worked for me too 😀 (Running W7)

    • narogTHX Apr 30, 2014 Reply

      Disabling IPv6 also helped my case, Tnx for fix!

  • Aleksei Apr 11, 2013 Reply

    Thank you man! That’s absolutely crazy! I would never guess by myself, I think.

  • Brian Royer May 16, 2013 Reply

    Thank you SO very much. My development team has been struggling with this issue for months and you saved my sanity. I would have never guess that a Windows 8 Desktop would default to 5% min. processing power. I can’t thank you enough!

    • erik kubica Feb 5, 2015 Reply

      a professional developer team knows, that best platform or os for developement is linux, mac or something unix*

      • dgraziotin Feb 5, 2015 Reply

        I am sorry I have to disagree here. I am an open source user, developer, and often advocate. However, my philosophy is that one should use whatever makes (s)he happy and satisfied, including proprietary OS and software.

        There are very good tools and environment for developing under Windows. Additionally, virtual machines and tools like Vagrant and Docker are making life really easy nowadays.

        I use Windows very, very rarely (I am typing this on a Macbook, which my university assigned to me) and it surely is my very least favorite OS. But it does not really matter what OS you use, as long as you are happy with it.

  • dgraziotin May 17, 2013 Reply

    Glad it is working for you all!

  • Paul Jun 7, 2013 Reply

    Thanks for sharing, my computer chugs with xammp and wamp installed. Looking forward to applying these fixes.

  • Obinna Ozoh Jul 15, 2013 Reply

    I didnt try all those other solutions. Just the one that worked for you, and it worked for me too. i would never have guessed that windows 8 limits processing A LOT when in power saver mode. it didnt happen like that in win7, xp, vista etc

    thanks a lot!!

  • edward.cc Jul 29, 2013 Reply

    the only thing i did was IPv6 disabling, it worked for me, i am on a windows 8 laptop dell.

  • Marco Afonso Oct 16, 2013 Reply

    I’m having the same issue. I can’t wait to try your suggestions… specially, disabling IPV6 and CPU power consumption.

    If its the CPU power consumption, I make the question: why the hell MS limits the power of my laptop by default??? The laptop it’s mine not theirs – if I want to destroy it, its only my fault not theirs. This smells like Apple… :p

  • paul han Dec 2, 2013 Reply

    solved, thanks to share this trick. very usefull for me, hope it works too for other users.

  • Emile Dec 2, 2013 Reply

    Disabling IPV6 worked for me. Thanks!

  • Azimkhan Dec 12, 2013 Reply

    Disabling IPv6 solved my problem too!

  • Rexzooly Feb 10, 2014 Reply

    After everything I tried with this and I mean everything and it was the power management all a long I was going to drop back down to a 32bit build, you just saved me about 20 Mins reisntalling all that but save me about a hours in downloading as mobile internet hates me right now 🙂

    Nice read

  • John Williams Mar 16, 2014 Reply

    Thanks so much. For me it was xdebug. Now looking for options to tune xdebug.

  • kim Mar 31, 2014 Reply

    for me work to remove xdebug.
    all the other voodoo make nothing.

    But no xDebug not meet demands.
    But anyhow nice collection of to try

  • Jirka Nov 8, 2014 Reply

    Thank A LOT! I increased my minimum processor state as you suggested and it’s really much faster. Thank you for this!

  • Daniel MK Feb 19, 2015 Reply

    The number 8 helped me a lot, you deserve a thank you very very much man.

  • Mark Groen Apr 15, 2015 Reply

    If you do not want to disable IPv6, the solution that worked for me was changing the connection from localhost to For example, using PDO to connect:

    new PDO(‘mysql:host=; etc….’);

  • Mohammed Basheer Jul 2, 2015 Reply

    Very good explanation , but still i have a problem ! ! ! ! … The problem is … i had Xammp on my system and without uninstalling it , i installed WAMP … So i check wamp the i uninstalled Xammp and tried to use wamp , but not working and it was always on orange colour icon on system tray … i did all these things that you said and still , not working ! don’t know what is the problem … can you tell me what should i do !?! 

    • dgraziotin Jul 2, 2015 Reply

      It looks to me that, having both Xammp and WAMP installed, there are still some Xammp parts running and employing some of WAMP’s ports. This is just a guess, however. Have you rebooted your system between each install/uninstall?

  • Aditya Nath Jha Aug 10, 2015 Reply

    Feels good, mighty good. Thanks a lot for these fixes. That high performance thing really works, even when gaming or video rendering! 😀

  • hanc Aug 10, 2015 Reply

    From 6 seconds to 1 second – thanks a lot! (windows 10)

    What worked:
    – NB high performance power plan
    – disabling ipv6
    – disabling xdebug
    – disabling other modules in php.ini I don’t use (sqlite etc..)

  • Josh Oct 11, 2016 Reply

    I found this post very helpful however ultimately none of the solutions here that I tried worked for me, I thought I would add one to the list that finally worked for me.

    I have my webroot directory under dropbox, this does not normally cause any problems, however there was one particular assets directory which had constant file changes, excluding this assets directory from dropbox sync significantly improved/fixed my localhost serving.

    Hope this may save someone else some pain.

Leave a comment