PHP 7 PHP-FPM Configuration File Location?

Last updated on

In this article we will locate a few different config files that relate to your PHP-FPM install. FPM uses php.ini syntax for its configuration files php-fpm.conf and pool configuration file www.conf.

php.ini

If you are looking for the php.ini file, please see article: Where is my PHP php.ini Configuration File Located?

php-fpm.conf

If you have the locate command, you can simply search for the file:

locate php-fpm.conf

Alternatively, confirm which version of PHP you are using by listing the PHP directory.

ls /etc/php/
7.2

Above we are on version 7.2, therefore, php-fpm.conf should be in /etc/php/7.2/fpm/php-fpm.conf.

To edit the php-fpm.conf PHP-FPM config file with nano:

sudo nano /etc/php/7.2/fpm/php-fpm.conf

www.conf

php-fpm.conf isn’t all of the php-fpm configuration. For serving web requests, php-fpm creates a new pool of processes, which have a separate configuration file www.conf.

If you have the locate command, you can simply search for the file:

locate www.conf

Alternatively, confirm which version of PHP you are using by listing the PHP directory.

ls /etc/php/
7.2

Above we are on version 7.2, therefore, the www.conf file should be in /etc/php/7.2/fpm/pool.d/www.conf.

To edit this file:

sudo nano /etc/php/7.2/fpm/pool.d/www.conf

Further Resources

Fore more in-depth information on PHP configuration, see the official manual at php.net.

 

 

Let me know in the comments if this helped. Follow me on Twitter, Facebook and YouTube.

p.s. I increased my AdSense revenue by 68% using AI 🤖. Read my Ezoic review to find out how.

1 Star2 Stars3 Stars4 Stars5 Stars 3.50 (6 votes)

Leave a Reply

Your email address will not be published. Required fields are marked *

We use Markdown to style comments, like on Github and Reddit.
To do a line break, type two spaces after the sentence.
You can add inline code by wrapping it in backticks: `code here`

    To do an entire block of code  
    type four spaces before the line
    and it will appear in a block like this.
    <-- four empty spaces

1 reply

Configuring PHP-FPM with Apache is quite difficult and time taking. I tried to do it manually on my local, but since I don't have server side knowledge I got stuck.