How to create custom php.ini file in a Litespeed webserver

How to create custom php.ini file in a Litespeed webserver
———————————————————
Do follow the steps below to create custom php.ini file:
Step 1:

Select Litespeed Web Server from WHM >  Litespeed Configuration > Admin Console > Configuration > Server > External App > lsphp5

Click on Edit,

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

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

Then, save the changes.

Step 2:

Main > Litespeed Web server > Quick Configuration of PHP suEXEC settings
----
Enable PHP suExec should be ‘yes.”
----

Step 3:
Then, Restart litespeed webserver from back end:

# /etc/init.d/lsws restart

Then, put custom php.ini file in the user’s home directory.

Put info.php page in public_html to test whether it is loading fine.

That’s it ..!!!!!!!! 🙂

Post navigation

Arunlal Ashok

DevOps Engineer. Linux lover. Traveller.
Always happy for an open discussion! Write to arun ((@)) crybit ((dot)) com.

One thought on “How to create custom php.ini file in a Litespeed webserver

Leave a Reply

Your email address will not be published. Required fields are marked *