Maximizing Your Server Performance

The Best PHP Handler

Your Apache based Web Server needs a better PHP Handler for Boosting Speed

    Boost Website Speed by choosing the Best PHP Handler

    Website Speed Optimization

    Finally, we are here in a long time talking about PHP and how we can speed up the code execution. Today, we will be discussing the PHP handlers and how we can boost our website speed if we are on a VPS or a dedicated server. We will skip shared hosting from the topic as PHP handlers cannot be switched from user end and is a server wide thing that can only be modified via admin access.

    In our previous subjects, we talked about the optimizations using caching techniques, server level optimizations and other way to speed up wesbite delivery, but today we are going to discuss the least popular one, the Handlers but this can be a game changer for your business. There are many php handlers available but today we are going to talk about the one shipped with cPanel. We have four handlers that can be compiled with Easy Apache namely : cgi, fcgi, suphp & lsapi, but not all of them are build for high performance.

    You may already find a lot of topics on the internet that may tell you to go with PHP-FPM for better performance which uses fcgi to run but is faster by the way it handles the processes. While many web servers allow their users to switch on PHP-FPM from the cPanel frontend, PHP-FPM is suitable in shared hosting environments where users do not have a choice. But with a VPS and dedicated server, you have a better choice. In our tests in recent years, the scaled down version of LiteSpeed which is being shipped with cPanel, you have a handler that can deliver faster webpages. With mod_lsapi enabled in Apache modules, you can use lsPHP and run your website with lower memory & cpu consumption while delivering more page views per minute thus allow you to upscale without investing on a new server.

    With lsphp, the memory reductions are massive and if you are limited on memory, then PHP-FPM or suPHP can be a memory hog causing your system to fail regularly. With lsphp Selector enabled, you may see 90% reduction in memory usage compared to other handlers and combined with other optimizations such as Opcache, you will see a website that has the lowest TTFB in comparison to all other PHP handlers.

    Let us know if you want to improve your server performance and our server experts can review and optimize it to its max potential.