Tsohost Help Centre

Table of Contents

cPanel custom php.ini

Updated Oct 31st, 2017 at 12:14 GMT

Unlike the Cloud where you can simply place a new php.ini for a site in the File Manager, on a cPanel server, you need to copy the default one from the server, and then edit as needed.

To do this you'll need to log in to the server via SSH (as par) and do the following:  

su -s /bin/bash username

cp /usr/local/lib/php.ini ~/

nano ~/public_html/.htaccess

and add this to the top of the file....

suPHP_ConfigPath /home/username

Once you have done this, you will have copied a standard php.ini configuration to the  the account and defined in the .htaccess of the specific account to use the settings listed in the php.ini in the /home directory, rather than the default server configuration.

You can then edit the php.ini in /home and edit as needed