How to Install LiteSpeed Web Server: A Complete Step-by-Step Guide
Introduction
Choosing the right web server is one of the most important decisions you can make for your website. A fast and reliable web server not only improves page loading speed but also enhances security, reduces server resource usage, and provides a better experience for your visitors.
Among the many web servers available today, LiteSpeed Web Server has become a favorite for developers, businesses, and hosting providers. Known for its exceptional performance and built-in caching technology, LiteSpeed can significantly outperform traditional web servers in many real-world scenarios.
Whether you’re setting up a new VPS, migrating from Apache, or optimizing a high-traffic website, this guide will walk you through the complete installation process.
What Is LiteSpeed Web Server?
LiteSpeed Web Server (LSWS) is a high-performance commercial web server designed as a drop-in replacement for Apache. It supports Apache configuration files, making migration straightforward while delivering better speed and lower server resource consumption.
LiteSpeed is widely used for hosting WordPress websites, WooCommerce stores, Laravel applications, and other PHP-based projects because of its advanced caching capabilities and excellent compatibility.
Why Choose LiteSpeed?
Before installing LiteSpeed, it’s worth understanding why so many website owners choose it over traditional web servers.
Some of its biggest advantages include:
- Faster website loading speeds
- Lower CPU and memory usage
- Built-in LiteSpeed Cache support
- HTTP/3 and QUIC support
- Advanced security features
- Apache compatibility
- Excellent PHP performance
- Improved handling of high-traffic websites
These features make LiteSpeed an ideal solution for both small websites and enterprise-level applications.
System Requirements
Before beginning the installation, ensure your server meets these basic requirements.
- A VPS or dedicated server
- Ubuntu 20.04, Ubuntu 22.04, Debian, AlmaLinux, Rocky Linux, or CentOS
- Root or sudo access
- At least 1 GB RAM (2 GB or more recommended)
- Stable internet connection
Updating your operating system before installation is also recommended.
Step 1: Update Your Server
Start by updating your server packages.
sudo apt update
sudo apt upgrade -y
For AlmaLinux, Rocky Linux, or CentOS:
sudo dnf update -y
Keeping your server updated helps prevent compatibility issues during installation.
Step 2: Download the LiteSpeed Installation Script
LiteSpeed provides an official installation script that simplifies the entire setup process.
Download it using:
wget https://www.litespeedtech.com/packages/noautoupdate.sh
Make the script executable:
chmod +x noautoupdate.sh
Step 3: Run the Installer
Execute the installation script.
sudo bash noautoupdate.sh
The installer will guide you through several options, including:
- LiteSpeed edition
- License type
- Administrator username
- Administrator password
Choose the options that best fit your server environment.
Step 4: Verify the Installation
Once installation is complete, check the server status.
sudo systemctl status lsws
If LiteSpeed is running correctly, you should see an active service status.
You can also verify by opening your server’s IP address in a web browser.
http://YOUR_SERVER_IP
The default LiteSpeed welcome page confirms that the installation was successful.
Step 5: Access the LiteSpeed WebAdmin Console
LiteSpeed includes a web-based administration panel for managing your server.
Open:
https://YOUR_SERVER_IP:7080
Log in using the administrator credentials you created during installation.
From the WebAdmin Console, you can manage:
- Virtual hosts
- SSL certificates
- PHP versions
- Security settings
- Server logs
- Performance tuning
Step 6: Configure PHP
LiteSpeed supports multiple PHP versions through LiteSpeed PHP (LSPHP).
You can install additional PHP versions if required.
For Ubuntu:
sudo apt install lsphp82 lsphp82-common lsphp82-mysql
Replace “82” with your preferred PHP version.
After installation, configure your virtual host to use the desired PHP binary.
Step 7: Open Firewall Ports
Allow LiteSpeed traffic through your firewall.
For Ubuntu with UFW:
sudo ufw allow 80
sudo ufw allow 443
sudo ufw allow 7080
sudo ufw reload
These ports enable:
- HTTP traffic
- HTTPS traffic
- LiteSpeed Admin Panel
Step 8: Create Your First Virtual Host
Inside the LiteSpeed WebAdmin Console:
- Navigate to Virtual Hosts.
- Click Add.
- Enter your domain name.
- Specify the document root.
- Save the configuration.
- Restart LiteSpeed.
Your website is now ready to be served.
Installing LiteSpeed Cache for WordPress
If you’re hosting WordPress, installing the LiteSpeed Cache plugin is highly recommended.
Benefits include:
- Page caching
- Browser caching
- Image optimization
- CSS and JavaScript optimization
- Lazy loading
- Object caching support
- CDN integration
When paired with LiteSpeed Web Server, the plugin delivers exceptional performance improvements.
Testing Your Installation
After configuration, verify everything is working correctly.
Check:
- Website accessibility
- SSL certificate
- PHP version
- Static file delivery
- Admin panel access
- Server logs
Running these checks ensures your server is functioning as expected before moving into production.
Common Installation Issues
Permission Errors
Ensure you’re using a root account or a user with sudo privileges.
Firewall Blocking Access
Confirm that ports 80, 443, and 7080 are open.
PHP Not Loading
Verify that LiteSpeed is configured to use the correct LSPHP version.
Website Displays Apache Page
Check whether Apache is still running and occupying ports 80 and 443.
Best Practices After Installation
After installing LiteSpeed, consider these optimizations:
- Enable HTTP/3 support.
- Install an SSL certificate using Let’s Encrypt.
- Configure LiteSpeed Cache.
- Enable Gzip or Brotli compression.
- Enable object caching with Redis or Memcached.
- Keep LiteSpeed and PHP updated.
- Regularly monitor server logs and resource usage.
These optimizations can significantly improve performance, security, and reliability.
Conclusion
Installing LiteSpeed Web Server is a worthwhile investment for anyone seeking better website performance and improved server efficiency. Its compatibility with Apache, powerful caching capabilities, and support for modern web technologies make it one of the best choices for hosting WordPress websites and other PHP applications.
By following the steps in this guide, you can deploy LiteSpeed with confidence and begin taking advantage of its speed, scalability, and robust feature set. Once installed, pairing LiteSpeed with proper caching, optimized PHP settings, and SSL configuration will help ensure your website performs at its best.