Follow the steps mentioned below to create a custom php.ini for the domain:
——-
1. Create a custom php.ini file in the root folder of the account (/home/username/public_html).
2. Put the required variable names and the required values in that file.
For eg, if you need to increase the value of the variable memory_limit or upload_max_filesize,
add the following in the php.ini file.
===
memory_limit = 128M
upload_max_filesize = 10M
===
3. Create a file named .htaccess in the root folder of your account (/home/username/public_html).
4. Add the following line in the .htaccess file which will set the php configuration path for your account to the custom file you have created:
===
suPHP_ConfigPath /home/username/public_html
===
5. Save the file and the values will be reflected immediately.
——
Note: Replace “username” with your cPanel username.