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.
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
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 Type | Price | Worker Processes | Best For |
|---|---|---|---|
| LiteSpeed Starter | Free | 1 worker | Testing and evaluation |
| Site Owner | $10/month | 1 worker | Single domain (5 subdomains) |
| Web Host Lite | $18/month | 2 workers | Up to 5 domains |
| Web Host Essential | $28/month | Unlimited | Unlimited domains |
| Web Host Professional | $48/month | Unlimited | 2-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
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-ipVerify you have root access:
whoamiThe 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.shMake the script executable:
chmod 700 lsws_whm_plugin_install.shStep 3 – Run the Installation Script
Execute the installer:
./lsws_whm_plugin_install.shThe 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.shStep 5 – Access the LiteSpeed Plugin in WHM
Log into WHM and locate the LiteSpeed Web Server section:
- Navigate to WHM (https://your-server-ip:2087)
- Search for “LiteSpeed” in the search bar
- 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:
- Click on “LiteSpeed Web Server Manager”
- Navigate to the “License” section
- Enter your license key in the provided field
- Click “Save” to activate the license
Verifying License Status
Confirm your license is active:
/usr/local/lsws/bin/lshttpd -vThis 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:
- Leave the license field empty initially
- LiteSpeed will operate with a 15-day trial license
- The trial includes all features but is limited to 2 workers
- 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:
- Navigate to “LiteSpeed Web Server Manager”
- Find the “Switch to LiteSpeed” button
- Click the button to replace Apache with LiteSpeed
- 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 statusYou should see output indicating LiteSpeed is active and running.
Check that websites are being served by LiteSpeed:
curl -I http://your-domain.comLook 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
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
- In WHM, navigate to “LiteSpeed Web Server”
- Click “LiteSpeed WebAdmin Console”
- This opens the console in a new browser tab
Method 2: Direct URL
Navigate directly to:
https://your-server-ip:7080Default 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.shFollow 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:
- Navigate to Listeners
- Edit your HTTPS listener (port 443)
- Enable “QUIC” option
- Click “Save” and gracefully restart
Configuring Cache Settings
Enable built-in cache for better performance:
- Navigate to Server Configuration → Modules
- Enable the “cache” module
- Configure cache storage path (default: /tmp/lshttpd/cache)
- 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
Installing LSCache for WordPress
For WordPress sites, the LiteSpeed Cache plugin provides exceptional performance improvements.
Installing the Plugin
- Log into WordPress admin dashboard
- Navigate to Plugins → Add New
- Search for “LiteSpeed Cache”
- Click “Install Now” on the official plugin
- 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:
- Navigate to LiteSpeed Cache → Crawler
- Enable “Crawler” option
- Configure crawl intervals (hourly recommended)
- 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:
- Navigate to Actions → Real-Time Stats
- View current connections, bandwidth, and request rates
- Monitor per-virtual-host statistics
- 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.logPerformance Comparison
Compare performance before and after LiteSpeed installation:
- Run speed tests using tools like GTmetrix or Pingdom
- Check server load averages with
toporhtop - 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:
- Navigate to “LiteSpeed Web Server Manager”
- Click “Switch to Apache” button
- Wait for confirmation message
- Verify Apache is running
The switch is immediate with no downtime. All your configurations remain intact.
Verifying Apache is Running
service httpd statusUninstalling 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.shThis 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 lshttpdTroubleshooting 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 configtestWebsites 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.