How to Install php-fpm in Windows?
Last Updated :
25 Jul, 2024
PHP-FPM stands for PHP FastCGI Process Manager. This is a strong and effective PHP FastCGI setup designed for managing operations on sites with high traffic. Setting up the php-fpm in Windows might seem tough, but with the right instructions, it’s achievable without any problems. This manual will guide you through the complete installation process, covering essential PHP concepts, various installation techniques, and how to confirm the installation’s success. Let’s begin without delay.
Key Terminologies
- PHP: It is one of the most popular general-purpose scripting languages that is mostly suited to web development.
- PHP-FPM: PHP FastCGI Process Manager is a daemon to manage server-based applications using FastCGI.
- FastCGI: This is, however, a simple protocol for interfacing the interactive programs with a web server.
- Windows: This is just an associated group of various proprietary graphical operating systems developed, marketed, and sold by Microsoft.
Step-by-Step Installation Guide
Method 1: Using Windows Subsystem for Linux (WSL)
Step 1: The first step is enabling WSL on your local machine with Windows; this can be done by navigating to Control Panel, then Programs, and after that Turning Windows features on or off.
Step 2: Then, you can set up any of your favourite Linux distributions from the Microsoft Store. Mostly, it is recommended to go with Ubuntu.
Linux distribution
Step 3: Now open the Linux terminal and then update the package list with this command:
sudo apt update
Update packages
Step 4: Then head to install php-fpm with following command:
sudo apt install php7.4-fpm
Install php-fpm command
Step 5: After the steps up, we need to make sure whether the installation takes place by verifying the installation with this command:
sudo systemctl status php7.4-fpm
Verification of php fpm
Method 2: By Using XAMPP
Step 1: First go to the following website and download and install XAMPP from [apachefriends.org](https://www.apachefriends.org/)
download xampp
Step 2: Then launch the XAMPP Control Panel and start Apache within it and verify that it is running up properly.
Xampp panal
Step 3: Now download the PHP-FPM binary from this resource [windows.php.net/downloads/pecl/releases/php_fpm/](https://windows.php.net/downloads/pecl/releases/php_fpm/).
Php fpm binary
Step 4: After that you need to extract the contents of the downloaded file to the PHP directory in your XAMPP installation which we installed and run previously
Binary extracted and put in xampp folder
Step 5: Configure PHP-FPM by editing php.ini and uncommenting the cgi-fix_pathinfo.

Step 6: After that, start the PHP-FPM by creating the .bat file and double-click on it to run.

After that it will open in the browser.
Installation Verification
To verify the installation, one needs just to open a terminal or command prompt and enter php-fpm -v. If php-fpm is installed correctly, the version information will be printed and displayed on the terminal.
Verification
I hope that, with this comprehensive guide, it will be much easier for you to go through these two different installations. Good luck with your setup with WSL or XAMPP for your php-fpm configuration.
Conclusion
Installing php-fpm on Windows is an effective and efficient way of managing PHP applications. By merely following this easy guide, you will be up and running with php-fpm using either the Windows Subsystem for Linux or XAMPP itself. After the installation, do not forget to verify the installation to ensure everything is set up correctly.