Table of Contents

LSPHP (PHP + LSAPI)

Installing and Configure LSPHP on LiteSpeed Web Server

Control panel environment

If you use any control panel such as cPanel, Plesk or DirectAdmin , there is no extra configuration required since LSWS installation script will configure everything for you and you should be able to run PHP out of the box after installation. LSWS will use the same PHP version as Apache set on your control panel automatically.

You can refer to the corresponding section for your environment to understand how it works for

If you are using CloudLinux, PHP selector is the recommended way to set up PHP.

Native (without a control panel)

Unlike apache or nginx using php-fpm or fastcgi, LSWS uses LSPHP, which is faster than php-fpm or fastcgi. On LSWS (native), you can install LSPHP from LiteSpeed CentOS, Ubuntu/Debian repositories, then create/configure external app and script handler to point LSWS to use the newly installed PHP binaries.

Please see Configuring LiteSpeed Web Server for PHP.

Execution Method

Please see suEXEC or non-suEXEC, a guide to figure out which PHP execution method you are using.

Process Modes: ProcessGroup/Daemon/Worker

LiteSpeed Web Server offers a number of different PHP process modes for the various needs and goals of shared hosting providers: ProcessGroup mode, Daemon mode, and Worker mode.

Opcode Cache

Detached Mode

As of LiteSpeed Web Server version 5.3, LSPHP can be run independent of the web server in Detached mode. This allows the LSPHP process, and it's opcode cache, to survive through server restarts.

Troubleshooting

Set up Multiple Versions of PHP

Install PHP PECL Extensions on LiteSpeed Web Server (Native) or OpenLiteSpeed

Check the availability of LSPHP PECL extention or build by yourself? See How to install pecl extention for LSPHP.

Performance tips

Configuration Tips

Troubleshooting

Add-Ons/Extensions