Enable custom php.ini in litespeed cpanel server

  This document lists the options to use per user php.ini under the environment of hosting control panel(cPanel/WHM, Plesk, DirectAdmin, etc) + LiteSpeed Web Server(LSWS).

Put something like “PHPRC=$VH_ROOT” in lsphp environment (Web Admin Console→Server→External App→lsphp5→Edit→Environment).

After that restart the litespeed server from back-end(/etc/init.d/lsws restart).

And put the custom php.ini in the following path /home/<user>/

Note:

  • Make sure permission of php.ini file is readable by suEXEC user
  • PHPRC is to use user-defined php.ini ONLY.
  • $VH_ROOT refers to user’s home directory which applies to every vhost(user account) under one main account.
Enable custom php.ini in litespeed cpanel server

One thought on “Enable custom php.ini in litespeed cpanel server

Leave a Reply

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

Fork me on GitHub