Boost WordPress performance on a low‑resource VPS with OpenLiteSpeed: event‑driven server, built‑in caching, HTTPS, and easy admin for faster Indian sites.
6 min read
Running WordPress on a lightweight web server can significantly reduce page load times, especially on a VPS with limited resources. OpenLiteSpeed (OLS) blends a modern event-driven architecture, built-in caching, and seamless PHP integration. It is a solid choice for Indian site owners who want speed and reliability without the complexity of Apache or Nginx.
1. Why OpenLiteSpeed?
Event-driven architecture – Handles thousands of connections in a single thread, keeping CPU usage low.
LiteSpeed Cache plugin – Works natively with WordPress, delivering page-level caching out of the box.
HTTP/2 & QUIC – Modern protocols are enabled by default, reducing latency on mobile networks.
Web-based admin UI – Manage virtual hosts, SSL certificates, and rewrite rules without editing text files.
Free community edition – No licensing fees for the open source version.
2. Prepare Your VPS
Make sure your server meets these basics:
At least 1 GB RAM (2 GB is preferable for traffic-heavy sites).
OLS provides its own repository, which contains the web server and the lsphp packages that are pre-compiled for optimal performance.
Debian / Ubuntu
# Install utilities
apt install -y curl gnupg2 ca-certificates lsb-release
# Add the OLS repository key
curl -s https://repo.litespeed.sh | bash
# Install OLS and the latest lsphp (e.g., lsphp81)
apt install -y openlitespeed lsphp81
# Enable the service to start on boot
systemctl enable --now openlitespeed
AlmaLinux / Rocky / RHEL
# Install utilities
dnf install -y curl gnupg2 ca-certificates redhat-lsb-core
# Add the OLS repository
curl -s https://repo.litespeed.sh | bash
# Install OLS and lsphp (e.g., lsphp81)
dnf install -y openlitespeed lsphp81
# Enable and start the service
systemctl enable --now openlitespeed
OLS listens on port 8088 for the admin console and on port 80 for HTTP traffic. The default admin username is admin; you will set a password next.
4. Secure the Admin Console
Open the console at http://your-vps-ip:8088 and create a strong password for the admin account. For production, restrict access by IP or place the console behind a firewall.
Example firewall rules:
Ubuntu/Debian – ufw
ufw allow from YOUR_IP to any port 8088 comment 'OpenLiteSpeed admin'
During mariadb-secure-installation, set a root password, remove anonymous users, disallow remote root login, and delete the test database.
Create a WordPress Database
mysql -u root -p
CREATE DATABASE wp_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL PRIVILEGES ON wp_db.* TO 'wp_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Replace StrongPassword123! with a unique password.
Download and Configure WordPress
# Navigate to the OLS web root (default: /usr/local/lsws/DEFAULT/html)
cd /usr/local/lsws/DEFAULT/html
# Remove the default index page
rm -f index.html
# Download WordPress
wget https://wordpress.org/latest.tar.gz
# Extract files
tar -xzf latest.tar.gz --strip-components=1
# Set ownership (OLS runs as user 'nobody')
chown -R nobody:nogroup .
# Create wp-config.php from the sample
cp wp-config-sample.php wp-config.php
# Edit wp-config.php to set DB credentials
# (use nano, vim, or your preferred editor)
Navigate to http://your-domain-or-ip and complete the WordPress setup wizard.
6. Optimize for Speed
Enable LiteSpeed Cache Plugin
Log in to WordPress admin.
Go to Plugins → Add New and search for “LiteSpeed Cache”.
Install and activate the plugin.
In LiteSpeed Cache → Settings, enable Cache, CDN (if you use one), and Image Optimization as needed.
Configure a Dedicated Virtual Host
OLS creates a default Example host. For production, add a new host:
# In the admin console → Virtual Hosts → Add
# Set:
# Virtual Host Name: yoursite
# Domain: yourdomain.com
# Document Root: /usr/local/lsws/yourdomain.com/html
# Enable PHP: lsphp81 (or the version you installed)
# Save and restart OLS
service openlitespeed restart
Enable HTTPS and HTTP/2
HTTPS is mandatory for SEO and security. OLS can obtain a free Let’s Encrypt certificate automatically.
# In the admin console → Listeners → Listener 443 (HTTPS)
# Enable “Secure” and set “Private Key File” / “Certificate File” to “Auto”.
# Click “Issue Certificate” and enter your domain and email.
Once TLS is active, HTTP/2 is enabled by default.
Fine-Tune PHP Settings
Adjust opcache and memory limits for better throughput. Edit the lsphp81.ini file (path may vary, e.g., /usr/local/lsws/lsphp81/etc/php/81/php.ini).
opcache.enable=1
opcache.memory_consumption=256
opcache.max_accelerated_files=10000
opcache.validate_timestamps=0 ; set to 1 in development
memory_limit=256M
post_max_size=64M
upload_max_filesize=64M
Restart OLS:
systemctl restart openlitespeed
Enable GZIP Compression
In the admin console:
Navigate to Server → Server Configuration → General → Compression.
Check “Enable Compression”.
Set “Compressible Types” to text/html,text/css,application/javascript,application/json.
Save and restart.
Leverage a CDN (Optional)
For audiences spread across India, a CDN like Cloudflare can cache static assets at edge locations. In LiteSpeed Cache settings, enable the “CDN” tab and provide the CDN URL (e.g., https://cdn.yourdomain.com). The plugin rewrites URLs automatically.
7. Basic Security Hardening
Performance and security complement each other. Apply these quick measures to protect your WordPress site.
Fail2Ban – Detects brute-force login attempts.
ModSecurity – Web-application firewall rules for OLS.
Regular backups – Use mysqldump and file snapshots.
# Install the core rule set
apt install -y modsecurity-crs # Debian/Ubuntu
dnf install -y mod_security # AlmaLinux/Rocky/RHEL (may need EPEL)
# In OpenLiteSpeed admin → Server → Modules → ModSecurity, enable the module.
# Point to the CRS config file, usually /usr/local/lsws/conf/modsec/modsecurity.conf
# Save and restart OLS.
Conclusion
OpenLiteSpeed delivers a high-performance, low-overhead platform that pairs well with WordPress. By preparing a clean VPS, installing OLS and PHP, configuring WordPress, and applying caching, TLS, and basic hardening, you can serve faster pages to visitors across India while keeping the server manageable.
Speed improvement is an ongoing effort. Monitor resources with htop or top, keep WordPress core, themes, and plugins updated, and revisit cache settings as traffic grows. With a solid OLS foundation, your WordPress site will be ready to handle the next surge in visitors without a hitch.