//Technology

Boost WordPress Speed: OpenLiteSpeed VPS Hosting Guide

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
Boost WordPress Speed: OpenLiteSpeed VPS Hosting Guide

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:

  1. At least 1 GB RAM (2 GB is preferable for traffic-heavy sites).
  2. 2 vCPU cores.
  3. Ubuntu 22.04 LTS, Debian 12, AlmaLinux 9, Rocky 9, or RHEL 9.
  4. Root or sudo access.

Log in via SSH:

ssh root@your-vps-ip

Update the system to keep it secure and compatible with OLS.

Debian / Ubuntu (apt)

# Update package lists
apt update

# Upgrade installed packages
apt upgrade -y

AlmaLinux / Rocky / RHEL (dnf)

# Refresh metadata
dnf check-update

# Apply updates
dnf upgrade -y

3. Install OpenLiteSpeed and PHP

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'

AlmaLinux/Rocky/RHEL – firewalld

firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="YOUR_IP" port protocol="tcp" port="8088" accept'
firewall-cmd --reload

5. Set Up WordPress

WordPress needs a database, core files, and the LiteSpeed Cache plugin.

Install MariaDB (Both OS Families)

# Debian/Ubuntu
apt install -y mariadb-server

# AlmaLinux/Rocky/RHEL
dnf install -y mariadb-server

# Start and enable MariaDB
systemctl enable --now mariadb

# Secure the installation
mariadb-secure-installation

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)

In wp-config.php, replace the placeholders:

define( 'DB_NAME', 'wp_db' );
define( 'DB_USER', 'wp_user' );
define( 'DB_PASSWORD', 'StrongPassword123!' );
define( 'DB_HOST', 'localhost' );

Enable the security keys by visiting the WordPress.org secret-key service and pasting the generated lines into the file.

Finish Installation via Browser

Navigate to http://your-domain-or-ip and complete the WordPress setup wizard.

6. Optimize for Speed

Enable LiteSpeed Cache Plugin

  1. Log in to WordPress admin.
  2. Go to Plugins → Add New and search for “LiteSpeed Cache”.
  3. Install and activate the plugin.
  4. 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:

  1. Navigate to Server → Server Configuration → General → Compression.
  2. Check “Enable Compression”.
  3. Set “Compressible Types” to text/html,text/css,application/javascript,application/json.
  4. 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 Fail2Ban (Both OS Families)

# Debian/Ubuntu
apt install -y fail2ban

# AlmaLinux/Rocky/RHEL
dnf install -y fail2ban

# Enable service
systemctl enable --now fail2ban

Create a WordPress jail to monitor wp-login.php:

cat > /etc/fail2ban/jail.d/wordpress.conf <<EOF
[wordpress]
enabled  = true
filter   = wordpress
logpath  = /usr/local/lsws/DEFAULT/html/wp-content/debug.log
maxretry = 5
bantime  = 3600
EOF

Restart Fail2Ban:

systemctl restart fail2ban

Enable ModSecurity

# 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.

openlitespeedwordpressvpsphpcachinglinuxsecurityindia

Try it on your own server

Follow along on a Cloud VPS with full root access, or read the step-by-step knowledge base guides.