Locating the php.ini File in WordPress

To determine the configuration file used by PHP, execute a script containing the phpinfo(); function. Check the “Configuration File (php.ini) Path”, “Scan this dir for additional .ini files,” and “additional .ini files parsed” sections on the page. Certain shared hosters may permit the placement of php.ini files in the webroot directory or other locations.


Solution:

To determine the configuration file used by PHP, a script containing the phpinfo(); function can be employed.

# cat /var/www/vhosts/domain.tld/httpdocs/info.php

Visit a webpage that includes PHP code and examine the initial sections of the page, namely the “Configuration File (php.ini) Path,” “Scan this dir for additional .ini files,” and “additional .ini files parsed” sections.

Starting from Parallels Plesk 10, it is feasible to establish a distinct php.ini per-domain for each domain that functions as a CGI or FastCGI application for PHP scripts. The designated location for this file is the ${VHOST_DIR}//etc/ directory, which is essential for the PHP interpreter to acknowledge it.

There are alternative methods available for WordPress users, which can be found by visiting http://www.wpbeginner.com/wp-tutorials/how-to-increase-the-
maximum-file-upload-size
-in-wordpress/.

Frequently Asked Questions

Posted in Php