Creating a custom php.ini in cPanel Print

  • 69

Creating a custom php.ini file can be useful in certain circumstances such as allowing different functions on different accounts, or memory limits, etc.

Note: Make sure to replace USERNAME with the account's username.

Firstly, run this in SSH:
cp /usr/local/lib/php.ini /home/USERNAME/public_html

Next, run this in SSH (make sure you're in public_html):
chown USERNAME:USERNAME php.ini

Finally, edit the .htaccess file in public_html and add this line:
SetEnv PHPRC /home/USERNAME/public_html/php.ini

Was this answer helpful?

« Back