How to find your php.ini file

Posted 2 years ago

To find your php.ini file you need to first look at your PHPInfo page.

Navigate to your public_html folder and create a new file with the below code. For argument purposes, let’s call this file info.php.


<?php 
phpinfo();
?>

Navigate to info.php in your browser, from here you can simply search for “php.ini” and below the “Environment” section you’ll see “PP_CUSTOM_PHP_INI” with the location to your custom php.ini file.

You can also check “Loaded Configuration File” which will show you the actual loaded configuration file.

It’s worth noting, you should be able to create a custom php.ini file, so if you don’t actually have a php.ini go to /httpdocs create a new file “php.ini” more often then not you may be required to restart apache.

To check if your configuration has taken place, find the settings you have changed.  Let’s say I edit “post_max_size” I can check the local/master. Local would be my custom value and master would be the main php.ini file.