Make PHP run faster on Windows 10

Although I like Windows 10, my PHP projects didn't run as fast as previously on macOS. This morning I sat down a few hours to optimize my development environment. My experience is that Xdebug and Windows Defender have a huge impact on performance.

For me, these steps helped me to increase the speed:

  • Install the latest 64 bits version of Visual C++ 2017;
  • Install the latest 64 bits version of PHP;
  • Install the latest 64 bits version of Apache;
  • Install the latest 64 bits version of MariaDB;
  • Disable unnecessary PHP extensions, e.g. php_sqlite3, php_mysql.dll, etc.;
  • Make sure all PHP extensions load correctly;
  • Make sure Apache, PHP, and MySQL load without errors;
  • Make sure to enable the php_opcache module;
  • Disable the Xdebug extension if not needed;
  • Optimize the MySQL configuration (my.ini file);
  • Run the environment from an SSD;
  • Add exclusions for Windows Defender to skip scanning files in MySQL data dir, Apache document root, and temp directories;

I've decided to store my whole dev environment in the cloud. This works well. In case my computer dies, I can run an installation script on another computer. That script will register some services and make some path variable changes. After that it already runs like nothing happened.

Do you have any tips or comments? I love to hear your feedback.

comments powered by Disqus