Current Location: Home> Latest Articles> How to Resolve Missing PHP-FPM in Ubuntu | Installation and Configuration Guide

How to Resolve Missing PHP-FPM in Ubuntu | Installation and Configuration Guide

M66 2025-07-30

Check if PHP-FPM is Already Installed

First, you can use the following command to check if PHP-FPM is installed on your Ubuntu system:

<span class="fun">dpkg -l | grep php-fpm</span>

If PHP-FPM is installed, you will see the version information. If it is not installed, the command will not return anything.

Install PHP-FPM

If PHP-FPM is not installed on your system, you can install it using the following commands:

<span class="fun">sudo apt update</span>
<span class="fun">sudo apt install php-fpm</span>

The system will automatically download and install PHP-FPM, and create the necessary configuration files.

Configure PHP-FPM

Once the installation is complete, you need to configure PHP-FPM to ensure it runs correctly. You can edit the configuration file using the following command:

<span class="fun">sudo nano /etc/php/X.X/fpm/pool.d/www.conf</span>

Replace X.X with the PHP version number you have installed. You can modify various parameters in the configuration file, such as the listen address, user group, and others, based on your needs.

Restart PHP-FPM Service

After configuring PHP-FPM, you need to restart the service for the changes to take effect. You can restart PHP-FPM using the following command:

<span class="fun">sudo systemctl restart phpX.X-fpm</span>

Check the Status of PHP-FPM

Finally, you can check the status of PHP-FPM with the following command:

<span class="fun">sudo systemctl status phpX.X-fpm</span>

If PHP-FPM is running normally, the system will show the status as Active (running). If there are errors, you can refer to the error message and troubleshoot accordingly.

By following these steps, you can resolve the issue of missing PHP-FPM in Ubuntu and successfully install and configure PHP-FPM. We hope this guide helps you fix the issue and ensure smooth running of your PHP applications on Ubuntu.