LiteSpeed Integration with WHM: How to Set It Up

LiteSpeed Integration with WHM: How to Set It Up

Upgrading your web server from Apache to LiteSpeed can dramatically improve website performance, reduce server load, and enhance user experience. For cPanel/WHM users, the transition to LiteSpeed Web Server is straightforward and delivers immediate performance benefits without requiring extensive configuration changes.

This comprehensive guide walks you through the complete process of installing LiteSpeed on cPanel/WHM servers, from obtaining your license to configuring optimal settings for maximum performance.

Quick Summary: Installing LiteSpeed on cPanel/WHM involves obtaining a license, running the installation script, and replacing Apache with LiteSpeed through the WHM interface. The entire process typically takes 15-30 minutes.

Why Choose LiteSpeed for cPanel/WHM?

Before diving into the installation process, understanding LiteSpeed’s advantages helps justify the investment and effort.

Performance Benefits

LiteSpeed delivers substantial performance improvements over Apache:

  • 5-10x faster static content delivery – Event-driven architecture handles concurrent connections more efficiently
  • 50-100% faster PHP processing – Native LSAPI protocol eliminates PHP-FPM overhead
  • Lower memory consumption – Efficient resource usage allows more websites per server
  • Better handling of traffic spikes – Maintains performance during sudden load increases

Apache Compatibility

LiteSpeed serves as a drop-in replacement for Apache, offering seamless migration:

  • .htaccess support – Existing Apache configurations work without modification
  • mod_rewrite compatibility – URL rewriting rules require no changes
  • cPanel integration – Full integration with cPanel’s management interface
  • Zero downtime migration – Switch between Apache and LiteSpeed instantly

Advanced Features

LiteSpeed includes enterprise-grade features that enhance hosting capabilities:

  • Built-in LSCache – Server-level caching for WordPress and other applications
  • HTTP/3 support – Latest protocol for improved connection performance
  • Anti-DDoS protection – Built-in defenses against connection floods
  • Brotli compression – Superior compression reduces bandwidth usage
  • ModSecurity compatibility – Web application firewall integration
Performance Impact: Hosting providers report 40-60% reduction in server load and 3-5x improvement in concurrent connection handling after switching to LiteSpeed.

Prerequisites and Requirements

Before beginning the installation, ensure your server meets the necessary requirements.

System Requirements

  • Operating System – CentOS 7/8, AlmaLinux 8/9, Rocky Linux 8/9, CloudLinux 7/8, or Ubuntu 18.04+
  • cPanel/WHM – Version 11.68 or later (latest version recommended)
  • Root Access – SSH root access to your server
  • Available Memory – Minimum 1GB RAM, 2GB+ recommended
  • Disk Space – At least 500MB free space for installation

LiteSpeed License

LiteSpeed requires a valid license before installation. Choose from several licensing options:

License TypePriceWorker ProcessesBest For
LiteSpeed StarterFree1 workerTesting and evaluation
Site Owner$10/month1 workerSingle domain (5 subdomains)
Web Host Lite$18/month2 workersUp to 5 domains
Web Host Essential$28/monthUnlimitedUnlimited domains
Web Host Professional$48/monthUnlimited2-core CPU license

Purchase your license from the official LiteSpeed store. You’ll receive a license key via email immediately after purchase.

Backup Recommendations

Although LiteSpeed installation is safe and reversible, creating backups provides insurance against unexpected issues:

  • Create a full server backup through WHM’s backup interface
  • Backup Apache configuration files manually
  • Document current Apache settings for reference
  • Take a server snapshot if using VPS or cloud hosting
Important: While you can switch back to Apache instantly, having backups ensures you can recover quickly if any issues arise during or after installation.

Installing LiteSpeed on cPanel/WHM

The installation process consists of downloading the plugin installer, running it, and configuring LiteSpeed through WHM.

Step 1 – Connect to Your Server via SSH

Connect to your server as the root user:

ssh root@your-server-ip

Verify you have root access:

whoami

The output should show “root”.

Step 2 – Download the LiteSpeed WHM Plugin Installer

Navigate to the source directory and download the installation script:

cd /usr/src
wget http://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh

Make the script executable:

chmod 700 lsws_whm_plugin_install.sh

Step 3 – Run the Installation Script

Execute the installer:

./lsws_whm_plugin_install.sh

The script performs several actions:
– Installs LiteSpeed Web Server
– Configures cPanel/WHM integration
– Sets up the LiteSpeed WebAdmin Console
– Configures initial settings

Installation typically takes 5-10 minutes. You’ll see progress messages as the script completes each step.

Step 4 – Clean Up Installation Files

After successful installation, remove the installer script:

rm -f lsws_whm_plugin_install.sh

Step 5 – Access the LiteSpeed Plugin in WHM

Log into WHM and locate the LiteSpeed Web Server section:

  1. Navigate to WHM (https://your-server-ip:2087)
  2. Search for “LiteSpeed” in the search bar
  3. Click on “LiteSpeed Web Server”

You should see the LiteSpeed Web Server management interface with several options.


Activating Your LiteSpeed License

Before switching from Apache to LiteSpeed, activate your license key.

Entering the License Key

In the WHM LiteSpeed interface:

  1. Click on “LiteSpeed Web Server Manager”
  2. Navigate to the “License” section
  3. Enter your license key in the provided field
  4. Click “Save” to activate the license

Verifying License Status

Confirm your license is active:

/usr/local/lsws/bin/lshttpd -v

This displays your LiteSpeed version and license information. Look for confirmation that your license is valid.

Trial License Option

If you want to test LiteSpeed before purchasing, you can use the free trial:

  1. Leave the license field empty initially
  2. LiteSpeed will operate with a 15-day trial license
  3. The trial includes all features but is limited to 2 workers
  4. Purchase and activate a license before the trial expires

Switching from Apache to LiteSpeed

After license activation, you can switch your web server from Apache to LiteSpeed with a single click.

Making the Switch

In the WHM LiteSpeed interface:

  1. Navigate to “LiteSpeed Web Server Manager”
  2. Find the “Switch to LiteSpeed” button
  3. Click the button to replace Apache with LiteSpeed
  4. Wait for the confirmation message

The switch happens immediately with zero downtime. LiteSpeed imports all Apache configurations, including virtual hosts and .htaccess files.

Verifying the Switch

Confirm LiteSpeed is running:

service lsws status

You should see output indicating LiteSpeed is active and running.

Check that websites are being served by LiteSpeed:

curl -I http://your-domain.com

Look for “LiteSpeed” in the Server header of the response.

Testing Website Functionality

After switching to LiteSpeed:

  • Visit your websites in a browser to ensure they load correctly
  • Test dynamic functionality (forms, logins, etc.)
  • Verify SSL certificates are working properly
  • Check that WordPress or other CMS platforms function normally
Pro Tip: The switch is completely reversible. If you encounter any issues, you can instantly switch back to Apache using the same interface.

Accessing LiteSpeed WebAdmin Console

The LiteSpeed WebAdmin Console provides direct access to advanced server configuration options.

Accessing the Console

Access the WebAdmin Console in two ways:

Method 1: Through WHM

  1. In WHM, navigate to “LiteSpeed Web Server”
  2. Click “LiteSpeed WebAdmin Console”
  3. This opens the console in a new browser tab

Method 2: Direct URL

Navigate directly to:

https://your-server-ip:7080

Default Login Credentials

The default credentials are:
Username: admin
Password: Check /usr/local/lsws/adminpasswd or reset it

To reset the admin password:

/usr/local/lsws/admin/misc/admpass.sh

Follow the prompts to set a new password.

WebAdmin Console Overview

The console provides access to:

  • Server Configuration – Global server settings and tuning options
  • Virtual Hosts – Individual domain configurations
  • Context Management – URL-specific configurations
  • Listeners – Port and IP address bindings
  • Real-time Statistics – Performance metrics and connection monitoring

Configuring LiteSpeed for Optimal Performance

After installation, optimize LiteSpeed settings for your specific server requirements.

Basic Performance Settings

In the WebAdmin Console, navigate to Server Configuration → Tuning:

Connection Settings:

  • Max Connections – Set to 2000-10000 based on server resources
  • Max SSL Connections – 50-70% of max connections
  • Connection Timeout – 60-300 seconds depending on application needs
  • Max Keep-Alive Requests – 1000-10000 for better connection reuse

PHP Settings:

Configure PHP processing for optimal performance:

  • Max Idle Time – 60 seconds (adjust based on traffic patterns)
  • Process Soft Limit – 10-50 per virtual host
  • Process Hard Limit – 20-100 per virtual host

Enabling HTTP/3 and QUIC

Enable the latest protocols for improved performance:

  1. Navigate to Listeners
  2. Edit your HTTPS listener (port 443)
  3. Enable “QUIC” option
  4. Click “Save” and gracefully restart

Configuring Cache Settings

Enable built-in cache for better performance:

  1. Navigate to Server Configuration → Modules
  2. Enable the “cache” module
  3. Configure cache storage path (default: /tmp/lshttpd/cache)
  4. Set cache size limits based on available disk space

Anti-DDoS Configuration

Configure connection limits to protect against attacks:

  • Per Client Soft Limit – 50-100 connections
  • Per Client Hard Limit – 100-200 connections
  • Bandwidth In Limit – Set based on your requirements
  • Bandwidth Out Limit – Set based on your bandwidth capacity
Configuration Tip: Start with conservative settings and increase limits gradually based on monitoring data. Overly aggressive limits can cause legitimate users to experience connection issues.

Installing LSCache for WordPress

For WordPress sites, the LiteSpeed Cache plugin provides exceptional performance improvements.

Installing the Plugin

  1. Log into WordPress admin dashboard
  2. Navigate to Plugins → Add New
  3. Search for “LiteSpeed Cache”
  4. Click “Install Now” on the official plugin
  5. Click “Activate” after installation

Basic LSCache Configuration

After activation, configure essential settings:

Enable Cache:

  • Navigate to LiteSpeed Cache → General
  • Ensure “Enable LiteSpeed Cache” is ON
  • Click “Save Changes”

Recommended Settings:

  • Object Cache – Enable for database query caching
  • Browser Cache – Enable to cache static resources
  • Image Optimization – Enable WebP conversion
  • CSS/JS Optimization – Enable minification and combination
  • Lazy Load Images – Enable for faster initial page loads

Running the Crawler

Pre-cache all pages using the crawler feature:

  1. Navigate to LiteSpeed Cache → Crawler
  2. Enable “Crawler” option
  3. Configure crawl intervals (hourly recommended)
  4. Click “Run” to start immediate crawl

Monitoring LiteSpeed Performance

Regular monitoring ensures LiteSpeed operates optimally and helps identify potential issues.

Real-Time Statistics

Access real-time statistics in the WebAdmin Console:

  1. Navigate to Actions → Real-Time Stats
  2. View current connections, bandwidth, and request rates
  3. Monitor per-virtual-host statistics
  4. Check request processing times

Log Files

LiteSpeed generates detailed logs for troubleshooting:

# Error log
tail -f /usr/local/lsws/logs/error.log

# Access log
tail -f /usr/local/lsws/logs/access.log

# stderr log (PHP errors)
tail -f /usr/local/lsws/logs/stderr.log

Performance Comparison

Compare performance before and after LiteSpeed installation:

  • Run speed tests using tools like GTmetrix or Pingdom
  • Check server load averages with top or htop
  • Monitor memory usage to verify reduction
  • Compare concurrent user capacity

Switching Back to Apache

If you need to revert to Apache for any reason, the process is equally simple.

Return to Apache

In the WHM LiteSpeed interface:

  1. Navigate to “LiteSpeed Web Server Manager”
  2. Click “Switch to Apache” button
  3. Wait for confirmation message
  4. Verify Apache is running

The switch is immediate with no downtime. All your configurations remain intact.

Verifying Apache is Running

service httpd status

Uninstalling LiteSpeed from cPanel/WHM

If you decide to completely remove LiteSpeed from your server, use the uninstallation script.

Complete Removal Process

Run the uninstaller script:

sh /usr/local/cpanel/whostmgr/docroot/cgi/lsws/lsws_whm_plugin_uninstall.sh

This script:
– Switches back to Apache automatically
– Removes LiteSpeed binaries
– Cleans up configuration files
– Removes the WHM plugin

Post-Uninstallation Cleanup

After uninstallation, verify:

  • Apache is running correctly
  • All websites are accessible
  • SSL certificates are functioning
  • No LiteSpeed processes remain

Check for remaining processes:

ps aux | grep lshttpd
Warning: Uninstalling LiteSpeed removes all LiteSpeed-specific configurations. If you plan to reinstall later, document any custom settings before removal.

Troubleshooting Common Issues

LiteSpeed Won’t Start

If LiteSpeed fails to start after installation:

# Check error logs
tail -50 /usr/local/lsws/logs/error.log

# Verify license
/usr/local/lsws/bin/lshttpd -v

# Test configuration
/usr/local/lsws/bin/lswsctrl configtest

Websites Return 503 Errors

Service unavailable errors typically indicate PHP processing issues:

  • Check PHP process limits in WebAdmin Console
  • Verify lsphp binaries are installed correctly
  • Review stderr.log for PHP errors
  • Increase process soft/hard limits if needed

SSL Certificate Issues

If SSL stops working after switching:

  • Verify certificates are in correct locations
  • Check virtual host SSL settings in WebAdmin
  • Restart LiteSpeed: service lsws restart
  • Check listener configuration for port 443

High Memory Usage

If LiteSpeed uses more memory than expected:

  • Reduce max connections in tuning settings
  • Lower PHP process limits per virtual host
  • Disable unused modules
  • Monitor for runaway PHP processes

Best Practices for LiteSpeed on cPanel

  • Start with Conservative Settings – Use default configurations initially and optimize based on monitoring
  • Enable LSCache Immediately – Install and configure LSCache plugin on all WordPress sites
  • Monitor Resource Usage – Regularly check memory, CPU, and connection statistics
  • Keep LiteSpeed Updated – Apply updates through WHM to get security patches and improvements
  • Configure Per-Site Limits – Set appropriate resource limits for each virtual host
  • Use HTTP/3 and QUIC – Enable modern protocols for better performance
  • Implement Anti-DDoS Rules – Configure connection limits to protect against attacks
  • Regular Backups – Maintain backups of LiteSpeed configurations
  • Test Before Production – Test changes in staging environments when possible
  • Document Custom Configurations – Keep records of any custom settings for troubleshooting

Conclusion

Installing LiteSpeed on cPanel/WHM provides immediate and substantial performance improvements for your hosting environment. The straightforward installation process, combined with Apache compatibility and zero-downtime switching, makes LiteSpeed an excellent choice for hosting providers and site owners seeking better performance without operational complexity.

The combination of built-in caching, HTTP/3 support, efficient resource usage, and superior PHP processing delivers measurable benefits including faster page loads, higher concurrent user capacity, and reduced server load. For WordPress hosting specifically, the integration with LSCache plugin creates a performance advantage that competitors using Apache or nginx struggle to match.

Whether you’re managing a single server or operating a large hosting business, LiteSpeed’s licensing flexibility and seamless cPanel integration make it accessible for operations of any size. By following this guide and implementing the recommended configurations, you can leverage LiteSpeed’s full potential to deliver faster, more reliable hosting services.

Start with the free trial to evaluate performance improvements in your specific environment, then choose the licensing tier that matches your requirements. The investment in LiteSpeed quickly pays for itself through improved user experience, better server efficiency, and competitive advantages in the hosting market.