Create Custom php.ini file in a Webserver

Please proceed with the following steps which will help you to create the custom php.ini file for a particular domain.

1) Login to your WHM >> Select “Litespeed Configuration” >> Admin Console >> Configuration >> Server >> External App >> lsphp5

2 ) Here, click the ‘Edit’ option

In the “Environment “ section, add “ PHPRC=$VH_ROOT ”

In the “suEXEC User “ section, add the account’s username for which custom php.ini has to be enabled and for “suEXEC Group “ section, add the group name of the account.

And save the changes.

3) Now proceed as Main >> Litespeed Webserver >> Quick Configuration of PHP suEXEC settings

Here, “Enable PHP suEXEC” should be ‘yes’.

4) Restart your Litespeed Webserver now,

===================
#/etc/init.d/lsws restart
===================

Then create the custom php.ini file in the user’s home directory and check this to make sure that the loaded php configuration file is your custom php.ini file by putting an info.php page in the public_html directory and loading it from the browser.

Dat’s it…!!!! 🙂 😉