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 A

Senior System Developer at Zeta. Linux lover. Traveller. Let's connect! Whether you're a seasoned DevOps pro or just starting your journey, I'm always eager to engage with like-minded individuals. Follow my blog for regular updates, connect on social media, and let's embark on this DevOps adventure together! Happy coding and deploying!

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 *