Edit php.ini settings for OpenLiteSpeed

We are going to modify the php.ini for a WordPress site with PHP version 7.4

The default OpenLiteSpeed ​​installation directory is “/usr/local/lsws” which is also where all the configuration files are located.
Depending on the installed PHP version (can be several), all files related to PHP are stored in lsphp72, lsphp73 or lsphp74 for PHP version 7.2, 7.3 or 7.4, respectively. Since we are using PHP version 7.4, the php.ini file can be found in the “lsphp74” directory and more specifically in “etc/php/7.4/litespeed/php.ini” within this directory.

To edit this file, use your favorite editor, in our case vim, to open it.
# vi /usr/local/lsws/lsphp74/etc/php/7.4/litespeed/php.ini
We can now modify the php directives that are necessary for WordPress to function properly.
memory_limit = 256M
post_max_size = 256M
upload_max_filesize = 256M
max_execution_time = 360
Finally, we need to restart the OLS php module by executing the following command
# killall -9 lsphp
      Mua WordPress Themes và Plugins nguyên bản tại Perfect Service
      Logo
      Nhập sản phẩm cần tìm
      Generic filters
      Compare items
      • Total (0)
      Compare
      0
      Shopping cart