Get 50% Discount Offer 26 Days

Recommended Services
Supported Scripts
WordPress
Hubspot
Joomla
Drupal
Wix
Shopify
Magento
Typeo3
How to Install LiteSpeed Web Server with cPanel on AlmaLinux 8/9 or CloudLinux 7/8 VPS

LiteSpeed Web Server serves as a perfect fit for hosting environments, providing superior performance and security. It is a robust web hosting ecosystem when used with CloudLinux and cPanel. Learn the installation and configuration of LiteSpeed Web Server with a trial license on a CloudLinux server managed by cPanel/WHM.

1. Requirements

Server Requirements

To install LiteSpeed on a Linux server, make sure that your server meets these requirements:

  • cPanel/WHM Installed: A valid cPanel/WHM license is required.
  • CloudLinux Installed: LiteSpeed fully supports CloudLinux’s unique features like CageFS and LVE. (Optional)
  • Hardware Requirements:
    • CPU: 1 GHz or higher.
    • RAM: 1 GB minimum (recommended: 2 GB or more for hosting multiple websites).
    • Disk Space: At least 10 GB.
    • Network: Stable internet connection for license validation and package downloads.

Supported Operating Systems

LiteSpeed Web Server is fully compatible with various Linux distributions, including AlmaLinux 8, AlmaLinux 9, CloudLinux 7, and CloudLinux 8. These operating systems ensure your web hosting operating environments will be stable and secure and contribute to giving your LiteSpeed operating environment maximum performance. To start, make sure the server you’re planning to use is running one of the supported distributions so you don’t have compatibility issues and confirm simple integration.

cPanel License

Verify your cPanel/WHM license with the following command:

/usr/local/cpanel/cpkeyclt

Update and verify your cPanel license on the licensing server with this command. It is very important to be sure that you have a valid license so that you can access cPanel features and updates.

Updating cPanel License - Terminal Command

Obtaining a LiteSpeed Trial License

Request a 15-day trial license for LiteSpeed Web Server:

  1. Visit the LiteSpeed Trial License Page

Navigate to the LiteSpeed Trial License Page using your browser. This page allows you to request a 15-day trial license for the LiteSpeed Web Server. It allows you to fill out the details as a user, start working with LiteSpeed’s features, and see its benefits without much work.

LiteSpeed Trial License Request Page
  1.  Provide Required Information

Please fill in the requested details on the form. Include your first name, last name, company name, and a valid email address. These details provide proper registration for the trial license and allow LiteSpeed to send your activation details. Please ensure accuracy to avoid delays in receiving the license.

LiteSpeed Trial License Confirmation
  1. Confirmation of 15-Day Trial

Once submitted, you’ll receive a confirmation on the website stating the trial license has been sent to your email address. Check your inbox for detailed instructions on activating the license. If needed, contact LiteSpeed support for further assistance with installation or setup.

LiteSpeed Trial License Confirmation Email

2. Installing LiteSpeed on CloudLinux

Installing Required Dependencies

Before installation, update your server and install the necessary tools.

For CloudLinux 7,8 and AlmaLinux 8, 9:

sudo yum update -y

to download and apply the latest updates from the CloudLinux repository. Keeping your system updated provides stability, resolves security vulnerabilities, and prepares the server for LiteSpeed installation by minimizing compatibility issues during setup.

Updating System Before LiteSpeed Installation
sudo yum install wget tar curl -y

To install essential tools like wget, tar and curl. Not only does it download the necessary files, but It also extracts and interacts with files; these utilities are critical to the process of LiteSpeed installation. If these dependencies are not available, then the installation can get interrupted.

Command for installing wget, tar, and curl with output in terminal window

Installing LiteSpeed Web Server

Download and execute the LiteSpeed installation script:

Use the command

bash <( curl https://get.litespeed.sh ) your_serial_no

Toegin the LiteSpeed Web Server installation. To activate the full version, replace your_serial_no with your provided license key. This script automatically fetches and installs LiteSpeed, streamlining the setup process.

Install with a Trial License:

To start with a trial of LiteSpeed, replace it with 

bash <( curl https://get.litespeed.sh ) TRIAL

This command will request and activate a 15-day trial license while installing LiteSpeed on your server. It’s an excellent option for evaluation without committing to a full license.

Installing LiteSpeed with Trial License

3. Configuring LiteSpeed with cPanel and CloudLinux

Switching cPanel to LiteSpeed

  1. Login to WHM:

Access the WHM (Web Host Manager) dashboards. WHM is the control panel for managing server configurations, making it the gateway to enabling LiteSpeed for your cPanel hosting.

  1. Navigate to Plugins > LiteSpeed Web Server.

In the WHM menu, locate the “Plugins” section within the left-hand interface. Select “LiteSpeed Web Server” from the list of installed plugins. Here it is all LiteSpeed-specific configurations and controls are available.

Locating LiteSpeed Web Server Plugin in WHM
  1. Click Switch to LiteSpeed

In the LiteSpeed Web Server plugin dashboard, click on the “Switch to LiteSpeed” button. It will replace Apache with LiteSpeed as the default web server, optimizing performance and introducing advanced caching capabilities for your hosted websites.

Switching to LiteSpeed Web Server in WHM

Switch to LiteSpeed:
After clicking “Switch to LiteSpeed,” Apache is replaced with LiteSpeed as the active web server seamlessly, and all in one shot without any further intervention required — no migrations, no downtime, no troubleshooting needed for your site, and no actions required by you. It is an action with the aim of improving server efficiency and reducing the consumption of resources so that website hosting runs faster and more efficiently.


Once the switch is complete, a confirmation message appears, highlighting that LiteSpeed is now active, Apache has stopped, and the configuration has been updated. This process ensures that the server is not running with conflicts and it is running LiteSpeed.

LiteSpeed Activation Confirmation Message

Configuring Virtual Hosts and WHM Integration

LiteSpeed will automatically import the Apache virtual host config. It can be verified and fine-tuned:

  1. Access the LiteSpeed WebAdmin Console:

Navigate to WHM and access the LiteSpeed WebAdmin Console to manage virtual host configurations. This console provides an intuitive interface for overseeing server settings and optimizing hosting performance. Check if all Apache virtual host configurations are accurately imported and fine-tuned for seamless integration with LiteSpeed Web Server.

Accessing LiteSpeed WebAdmin Console
  1. Go to Configuration > Virtual Hosts to review the imported domains:

Go to the LiteSpeed WebAdmin Console “Configuration” tab and select Virtual hosts. In this section, you can review and manage domains that were imported from Apache configurations. Make sure the settings of your domain match your server’s performance and security requirements.

Navigating to Virtual Hosts in LiteSpeed WebAdmin

The Virtual Host List in LiteSpeed Web Server is where imported or manually configured virtual hosts appear. Each entry displays the Virtual Host Name, the root directory for hosting files, and actions like managing or editing configurations. Use this interface to monitor or adjust domain-specific hosting settings.

Managing Virtual Hosts in LiteSpeed WebAdmin

Using CloudLinux CageFS with LiteSpeed

Enable CageFS for user isolation:

  1. Login to WHM: 

Log into the Web Host Manager (WHM) using your administrator credentials. Server configurations are under the central control of WHM. With this step, we will have access to the required settings for enabling and configuring CageFS with LiteSpeed. This process allows us to isolate the user and customize the system as needed.

  1. Go to CloudLinux > CageFS: 

Navigate to the “CloudLinux” section within WHM and select “CageFS” from the available options. Tools like CageFS, which is required for managing the user environment, are included in this section. By accessing this feature, you can also configure and fine-tune user isolation.

Accessing CageFS User Manager in WHM
  1. Enable CageFS for All Users: 

Check if CageFS is enabled for every user on the server. This step amplifies security, as each user is ‘secured’ in its environment: Each user cannot access or affect the others. Like LiteSpeed, this feature is supported in full on LiteSpeed, making it a more seamless integration for better performance and protection.

Enabling CageFS for All Users in WHM

4. Testing the Setup

Verifying LiteSpeed in cPanel

  1. Login to WHM: 

You can access the Web Host Manager (WHM) by entering your server’s IP address followed by port 2087 (e.g., https://your-server-ip:2087). Use your root credentials while at the same time gaining administrative control over server configurations.

  1. Navigate to Plugins > LiteSpeed Web Server: 

Once inside WHM, locate the “Plugins” section in the menu. Click on “LiteSpeed Web Server” to view the LiteSpeed configuration page and verify that LiteSpeed is running as the default web server.

LiteSpeed Web Server Status in WHM
  1. Confirm that the server status is displayed as Running: 

In WHM, find the LiteSpeed Web Server area, then check whether LiteSpeed is running. A clear status shows that the web server is running to ensure successful installation and efficient functioning as the default web server.

LiteSpeed Web Server Running Status

Verify LiteSpeed logs for errors: 

Use the command

cat /usr/local/lsws/logs/error.log

To inspect LiteSpeed’s error logs. This step provides detailed server error messages to help diagnose potential issues or configuration errors.

5. Advanced Features

Restart LiteSpeed: 

Run

/usr/local/lsws/bin/lswsctrl restart

to restart LiteSpeed. 

Restarting LiteSpeed Web Server

This command refreshes the server, applying configuration changes or resolving minor issues without requiring a complete system reboot.

Optimizing LiteSpeed with CloudLinux Features

Take advantage of cloudlinux’s unique features:

  • LVE Manager: Limit resource usage for each user to confirm server stability.
    1. Log into WHM and access LVE Manager: To optimize resource usage, log in to WHM and navigate to CloudLinux > LVE Manager. This tool is integral to managing user-level resource allocations for your server, ensuring efficient performance across multiple accounts.
Accessing CloudLinux LVE Manager in WHM
  1. Set CPU, RAM, and IO limits: Use LVE Manager to define each user’s resource limits, such as CPU usage, RAM allocation, and I/O capacity. This step is crucial in preventing resource overuse, ensuring stability, and maintaining a balanced hosting environment.
Setting User Resource Limits in CloudLinux LVE

Using LiteSpeed Cache for WordPress with cPanel

  1. Install the LiteSpeed Cache Plugin in WordPress: 

Access your WordPress admin dashboard, navigate to the plugin section, and search for “LiteSpeed Cache.” Install and activate the plugin to enable seamless website optimization.

LiteSpeed Cache Plugin Dashboard in WordPress
  1. Navigate to LiteSpeed Cache Management in WHM: 

Log in to WHM, and go to LiteSpeed Web Server > Cache Management. This section allows you to configure cache-related settings for all domains on your server.

  1. Enable Caching for the WordPress Domain: 

Locate the specific domain in the LiteSpeed Cache Management section and enable caching. This step ensures efficient content delivery and reduces server load.

  1. Fine-Tune Cache Settings in the WordPress Plugin Interface: 

Open the LiteSpeed Cache plugin settings in WordPress. Adjust settings like page optimization, image compression, and CDN integration to suit your performance and user experience needs.

6. Troubleshooting

Common Issues

Problem: Websites not loading after switching to LiteSpeed.

One common issue is websites failing to load after switching to LiteSpeed. 

Solution:

  • The first step in resolving this is ensuring the LiteSpeed Web Server runs. 
/usr/local/lsws/bin/lswsctrl status

This command will print the current status of LiteSpeed. It won’t work, unless the server is not running, then restart the server to enable it. The root cause of websites not loading is often not because websites ‘are not’ loading, but rather that there is no server for the websites even to load on. Test if the server is working smoothly.

Checking LiteSpeed Web Server Status
  • Check the error logs for misconfigurations:

If your websites are not functioning correctly after switching to LiteSpeed, checking the error logs can help identify misconfigurations. Use the command:

cat /usr/local/lsws/logs/error.log

This command will show Lite-Speed error logs that detail common problems. But also find errors like incorrect file paths, wrong permissions, or conflicts in configurations. Solutions to these issues will make the website work normally. Making sure your server is running fine regarding issues is by regularly reviewing error logs.

Checking LiteSpeed Error Log

7. Conclusion

LiteSpeed Web Server’s integration with CloudLinux and cPanel creates a powerful, high-performance hosting solution. Following this guide, you’ve installed LiteSpeed with a trial license, integrated it with cPanel, and optimized it with CloudLinux features such as CageFS and LVE.

For additional resources, consult LiteSpeed Documentation and CloudLinux Documentation.

About the writer

Vinayak Baranwal Article Author

Vinayak Baranwal wrote this article. Use the provided link to connect with Vinayak on LinkedIn for more insightful content or collaboration opportunities.

Leave a Reply

Your email address will not be published. Required fields are marked *

Lifetime Solutions:

VPS SSD

Lifetime Hosting

Lifetime Dedicated Servers