LiteSpeed PHP LSAPI (LiteSpeed Server Application Programming Interface) is a way of processing PHP scripts that is significantly faster and more efficient than traditional methods such as CGI or even PHP-FPM via standard configurations. The result: faster loading times, lower memory usage and better performance under heavy load, without you as a website administrator having to configure anything.
What exactly is LSAPI
LSAPI is LiteSpeed’s own interface between the web server and the PHP interpreter. Instead of starting a new process for every request, LSAPI keeps PHP processes persistently alive. These processes keep running and handle multiple requests in succession, without having to be restarted each time. This saves overhead and ensures the server has to do less work per page view.
In addition, LSAPI supports suEXEC, which means PHP scripts always run under the correct user permissions. This is important for security on shared servers, as it prevents scripts from one website from accessing files belonging to another website.
Why LSAPI is faster than alternatives
Regular CGI processing starts an entirely new PHP process for every request. This costs time and server resources. PHP-FPM partially solves this with process pooling, but LSAPI goes a step further by scaling intelligently: the number of active PHP processes automatically adjusts to the current load, without manual configuration.
Another difference lies in the communication between the web server and PHP. LSAPI uses a more efficient protocol than the standard FastCGI implementation, with less overhead per request. Combined with NVMe storage, which offers much faster read and write speeds than traditional SSDs or hard drives, this results in noticeably faster response times, especially for websites with many simultaneous visitors.
Benefits for WordPress and other CMSs
WordPress, Joomla and WooCommerce largely consist of PHP code that is executed on every page view. The faster that code is processed, the faster the page loads. LSAPI has a direct impact here, since database-heavy plugins, dynamic content and webshop functionality take less time to process.
LSAPI also works well together with opcode caching such as OPcache, so PHP scripts don’t have to be reinterpreted every time. Combined with LiteSpeed Cache (available for WordPress as a plugin), this creates a double speed boost: static content comes from the cache, while dynamic requests are handled efficiently by LSAPI.
Setting up LSAPI in practice
On servers running Plesk and LiteSpeed, LSAPI is usually active by default as the PHP processing method. Still, it’s good to check whether your website makes optimal use of it.
Check the PHP handler
Log in to Plesk, go to your domain and open the PHP settings. Check whether ‘LSAPI’ or ‘LiteSpeed’ is set as the handler instead of CGI.
Set the correct PHP version
Choose the PHP version that matches your CMS or application. A recent version combines better with LSAPI optimizations and yields extra speed gains.
Enable caching where possible
If available, install a caching plugin that works with LiteSpeed, so that dynamic and static content are handled optimally.
Test the loading time
Measure your website’s loading time before and after the changes, for example with a speed test, to check the effect.
If you get stuck setting up the PHP handler or are unsure about the right PHP version, check the knowledge base for detailed explanations of each part of Plesk.
Frequently asked questions
Is LSAPI the same as PHP-FPM?
No. Both are methods for efficiently managing PHP processes, but LSAPI was specifically developed by LiteSpeed and works more closely with the LiteSpeed web server, enabling additional optimizations.
Do I need to configure anything myself to use LSAPI?
On a server already running LiteSpeed, LSAPI is often the active PHP handler by default. Check this in Plesk under your domain’s PHP settings.
Does LSAPI work with every PHP version?
LSAPI supports multiple PHP versions simultaneously on the same server, so different websites can use their desired version independently of each other.
Does LSAPI affect my email or only my website?
LSAPI only affects the processing of PHP scripts for your website. For business email hosting, other technical components apply that function independently of PHP processing.
Can LSAPI also be used with a new domain or migration?
Yes, LSAPI is activated per website and is independent of when you registered your domain names or built your site. This is automatically taken into account when switching to Tandata.
Conclusion
LiteSpeed PHP LSAPI ensures faster PHP processing through persistent processes, more efficient communication and smart scaling. Combined with NVMe storage and good caching, this results in noticeably faster websites, without you having to manage complex settings yourself.