Where to Find php.ini PHP Configuration Files on Your Server

php.ini PHP Configuration Files

PHP configuration files are not located in the same place in all operating systems variants. Therefore for you to know where your specific configuration is located, we have provided this little guide featuring the major operating systems and distros.

First off you can run php -i from the command-line on Windows or terminal on Unix systems. This will display a lot of information about your particular setup. Next, you need to look for the value of the Loaded Configuration File.

Here is a quick example on Unix based systems.

$ php -i | grep 'Loaded Configuration File'
Loaded Configuration File => /etc/php.ini

Here are the general locations of the php.ini PHP configuration files.





Ubuntu < 16.10


Ubuntu >= 16.10


Ubuntu >= 18.04



{installation directory}/php/php.ini

Read Also  Hours Later Amazon S3 Service Outage Still Crippling the Internet