{"id":56605,"date":"2020-08-13T14:23:28","date_gmt":"2020-08-13T19:23:28","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=56605"},"modified":"2020-08-13T14:23:28","modified_gmt":"2020-08-13T19:23:28","slug":"how-to-install-litespeed-web-server-and-litespeed-cache-on-cpanel","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/products\/how-to-install-litespeed-web-server-and-litespeed-cache-on-cpanel\/","title":{"rendered":"How To Install LiteSpeed Web Server and LiteSpeed Cache on cPanel"},"content":{"rendered":"\n
The Apache web server is a critical component of cPanel & WHM, but no software can be all things to all people, and that\u2019s why we\u2019re happy to offer alternatives like NGINX and the LiteSpeed Web Server<\/a>.<\/p>\n\n\n\n We recently wrote about using NGINX instead of Apache in cPanel<\/a>, and, although we\u2019re working on it, NGINX isn\u2019t yet a fully compatible replacement. LiteSpeed is a different story. It is easy to install, integrates perfectly with cPanel & WHM, and you can make the switch without having to re-learn how to manage your web server from scratch.<\/p>\n\n\n\n In this article, we\u2019ll look at what LiteSpeed is, why you might want to use it instead of Apache, and how to install and configure it on cPanel.<\/p>\n\n\n\n LiteSpeed is a proprietary web server built as a drop-in replacement for Apache. It supports httpd.conf and .htaccess configuration files, and it works with many Apache modules, including mod_rewrite, mod_security, and mod_cache.<\/p>\n\n\n\n However, under the hood, LiteSpeed has an entirely different design, which in some circumstances, gives it an edge on Apache. Like NGINX, it has an event-driven architecture, so it\u2019s super quick with static content and great for sites that serve lots of concurrent users.<\/p>\n\n\n\n In addition to being blazing fast when serving HTML pages, scripts, and images, it also has a few tricks up its sleeve where dynamic sites like WordPress and Magento are concerned. LiteSpeed has an integrated full-page cache with a plugin system that brings caching to many popular content management systems and ecommerce applications, a feature that would usually require an external application or a plugin managed on the application level.<\/p>\n\n\n\n With LiteSpeed, you can offer hosting clients the compelling combination of Apache compatibility and zero-configuration caching for high-performance. As a server administrator, you benefit from low resource consumption and, of course, excellent integration with cPanel & WHM via a plugin, which includes a comprehensive management interface.<\/p>\n\n\n\n Because it is a drop-in replacement for Apache, the installation process is straightforward. However, there are two prerequisites:<\/p>\n\n\n\n We will install the webserver with the official installation script, which you can download and examine here<\/a>. To run it, log in to your server over SSH as root, and enter this command:<\/p>\n\n\n\n bash <( curl https:\/\/get.litespeed.sh ) your_serial_no<\/em> Replace \u201cyour_serial_no\u201d with the one that came with your license. You are presented with a series of options, and it\u2019s fine to select the defaults. We\u2019ll run through the configuration process to adjust these values in the management interface. If you want to know more, take a look at the script\u2019s documentation<\/a>.<\/p>\n\n\n\n Although we won\u2019t be using it in this article, be sure to take note of the WebAdmin password the script prints when it is finished.<\/p>\n\n\n\n Next, go to your server\u2019s WHM interface and select LiteSpeed Web Server<\/em> in the Plugin<\/em> menu. You may see a couple of warnings, which we\u2019ll fix next.<\/p>\n\n\n\n First, we have to disable the ruid2 Apache module. This module allows Apache to run as different users, but it is not compatible with LiteSpeed.<\/p>\n\n\n\n Select EasyApache<\/em> in the Software <\/em>menu and click Customize<\/em> in Currently Installed Packages<\/em>. Select Apache Modules<\/em>, search for \u201cruid,\u201d and ensure that the switch is off.<\/p>\n\n\n\n Click the Review <\/em>Tab and then the Provision<\/em> button at the bottom of the page. When you navigate back to the LiteSpeed settings, the ruid2 module warning should be gone.<\/p>\n\n\n\n Next, we\u2019re going to activate the new web server. You can run it and Apache in parallel on different ports, but we\u2019ll deactivate Apache and replace it with LiteSpeed.<\/p>\n\n\n\n Select Switch to LiteSpeed<\/em> in the plugin interface.<\/p>\n\n\n\n When you confirm on the next page, cPanel stops Apache and starts the LiteSpeed Web Server.<\/p>\n\n\n\n That\u2019s it! Your cPanel server now uses LiteSpeed as its primary web server, and you can take advantage of a variety of useful features, including QUIC support, one-click switching between LS and Apache, and integrated caching, which we\u2019ll set up in the next section.<\/p>\n\n\n\n One of the biggest benefits of LiteSpeed is a built-in full-page caching system called LSCache, which you can use with a wide variety of content management systems and eCommerce applications.<\/p>\n\n\n\n You will need an additional license for some LSCache features, but WordPress caching works out of the box, so that\u2019s what we\u2019ll focus on.<\/p>\n\n\n\n First, we need to create folders on the filesystem for the cache to store data. The installation script could have done this for us, but it\u2019s just as easy to do it WHM.<\/p>\n\n\n\n Select LiteSpeed Configuration<\/em> and then Cache Root Setup<\/em>.<\/p>\n\n\n\n When you click Set Missing Cache Roots,<\/em> cPanel creates the cache root folders for the server and for virtual hosts.<\/p>\n\n\n\n Go back to the plugin page, and select Manage Cache Installations<\/em>. Hit the Scan<\/em> button and cPanel searches for WordPress sites installed on the server. Once the list of sites is populated, activate caching on individual sites by clicking the \u201con\u201d button in the table\u2019s Actions<\/em> column.<\/p>\n\n\n\n If you would like to use the caching feature with applications such as Magento, Joomla, and Laravel, check out the LSCache plugin store<\/a>.<\/p>\n\n\n\n The Apache web server is the right choice for most users. It strikes the ideal balance of configurability, extensibility, and flexibility. However, LiteSpeed is an excellent alternative for server administrators who want to combine cPanel & WHM with a very fast event-driven web server with built-in caching and other advanced features.<\/p>\n\n\n\n As always, if you have any feedback or comments, please let us know. We are here to help in the best ways we can. You\u2019ll find us on Discord<\/a>, the cPanel forums<\/a>, and Reddit<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" The Apache web server is a critical component of cPanel & WHM, but no software can be all things to all people, and that\u2019s why we\u2019re happy to offer alternatives like NGINX and the LiteSpeed Web Server. We recently wrote about using NGINX instead of Apache in cPanel, and, although we\u2019re working on it, NGINX […]<\/p>\n","protected":false},"author":77,"featured_media":65469,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[49],"tags":[],"class_list":["post-56605","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-products"],"acf":[],"yoast_head":"\nWhat is the LiteSpeed Web Server?<\/strong><\/h2>\n\n\n\n
How To Install LiteSpeed Web Server on cPanel<\/strong><\/h2>\n\n\n\n
<\/p>\n\n\n\n<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
How to Set Up LiteSpeed Cache on cPanel<\/strong><\/h2>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n