This article describes how to use custom php.ini files to control PHP settings for your web site.
This article applies to non-Turbo managed hosting packages with the cPanel management interface. For Turbo hosting packages, please see this article.
A php.ini file contains directives for controlling many PHP settings. You can set up one or multiple custom php.ini files to define how your web site functions. For example, you might have a custom file in your /home/username/public_html
directory for your web site's main pages, and a separate custom file in your /home/username/public_html/images
directory for your web site's image files.
php.ini
.phpinfo
file in the directory where you created the php.ini.You can create custom php.ini files for each directory in your web site, but many people configure settings in one php.ini file and then apply it to the entire web site. To do this, add the following line to the .htaccess file in your web site's document root directory:
php_value upload_max_filesize 10M
For further details on configuring PHP settings, refer to the official PHP documentation or your hosting provider's support resources.