// SSD VPS

How to Install and Configure OpenLiteSpeed with WordPress on a Linux VPS: Complete Guide — CLIQHOST

October 17, 2026 · by Alex M.

How to Install and Configure OpenLiteSpeed with WordPress on a Linux VPS: Complete Guide — CLIQHOST

OpenLiteSpeed is a high-performance, open-source web server developed by LiteSpeed Technologies. It handles significantly more concurrent requests than Apache or Nginx on equivalent hardware. Paired with the LSCache module and a fast SSD VPS, it creates an ideal platform for demanding WordPress sites.

In this guide you will learn how to install OpenLiteSpeed, LSPHP, MariaDB, and WordPress on a VPS running Ubuntu 22.04 — step by step, with real shell commands.


Why OpenLiteSpeed Instead of Nginx or Apache?

Before jumping into installation, let's understand the key advantages:

  • Event-driven architecture — handles thousands of concurrent connections with low RAM usage.
  • Native LSCache — a built-in caching module compatible with the LiteSpeed Cache plugin for WordPress.
  • HTTP/3 and QUIC — out-of-the-box support for modern protocols.
  • Web admin panel — graphical interface on port 7080, eliminating complex config files.
  • Zero downtime reload — reload configuration without stopping the server.

On an NVMe VPS running multiple WordPress sites, OpenLiteSpeed can dramatically reduce response times compared to the classic LAMP stack.


Prerequisites

  • A VPS with Ubuntu 22.04 LTS (minimum 1 GB RAM, 1 vCPU recommended)
  • Root access or a user with sudo privileges
  • A domain pointed to the VPS IP address
  • An active SSH connection

If you don't have a server yet, order an SSD VPS in Moldova from CLIQHOST — fast provisioning and a dedicated IP included.


Step 1: Update the System

Before installing anything, update existing packages:

sudo apt update && sudo apt upgrade -y

If kernel updates were applied, reboot the server:

sudo reboot

Step 2: Install OpenLiteSpeed

Add the official LiteSpeed repository and install OpenLiteSpeed:

wget -O - https://repo.litespeed.sh | sudo bash
sudo apt install openlitespeed -y

Start and enable the service:

sudo systemctl start lsws
sudo systemctl enable lsws

Check the status:

sudo systemctl status lsws

The admin panel is available at http://YOUR_SERVER_IP:7080. Set the admin password:

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

Enter a username and a strong password when prompted.

Security tip: Restrict access to port 7080 via firewall — allow only your IP: sudo ufw allow from YOUR_IP to any port 7080.


Step 3: Install LSPHP (PHP for LiteSpeed)

OpenLiteSpeed uses LSPHP, an optimised PHP build. Install LSPHP 8.2 (recommended for WordPress):

sudo apt install lsphp82 lsphp82-common lsphp82-mysql lsphp82-curl \
  lsphp82-json lsphp82-xml lsphp82-zip lsphp82-mbstring \
  lsphp82-gd lsphp82-imagick lsphp82-intl -y

Verify the installed version:

/usr/local/lsws/lsphp82/bin/php8.2 -v

Set PHP as the Default Interpreter

From the admin panel (:7080):

  1. Go to Server Configuration → External App
  2. Edit lsphp and update the path to: /usr/local/lsws/lsphp82/bin/lsphp
  3. Save and apply changes.

Or edit the config file directly:

sudo nano /usr/local/lsws/conf/httpd_config.conf

Find the extProcessor lsphp section and update the binary path.


Step 4: Install MariaDB

WordPress requires a database. MariaDB is the recommended choice for Linux VPS servers:

sudo apt install mariadb-server -y
sudo systemctl start mariadb
sudo systemctl enable mariadb

Run the security script:

sudo mysql_secure_installation

Answer the prompts:

  • Set root password: Yes
  • Remove anonymous users: Yes
  • Disallow remote root login: Yes
  • Remove test database: Yes
  • Reload privileges: Yes

Create the WordPress Database

sudo mysql -u root -p

In the MariaDB console:

CREATE DATABASE wordpress_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wp_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 5: Configure a Virtual Host in OpenLiteSpeed

Create the site directories:

sudo mkdir -p /var/www/mydomain.com/{html,logs,conf}
sudo chown -R nobody:nogroup /var/www/mydomain.com/html

Add the Virtual Host via the Panel

  1. In the panel at :7080, navigate to Virtual Hosts → Add
  2. Fill in the fields:
    • Virtual Host Name: mydomain
    • Virtual Host Root: /var/www/mydomain.com/
    • Config File: /var/www/mydomain.com/conf/vhconf.conf
    • Enable Scripts/ExtApps: Yes
  3. Save.

Create the Virtual Host Configuration File

sudo nano /var/www/mydomain.com/conf/vhconf.conf

Add the base configuration:

docRoot                   $VH_ROOT/html
index  {
  useServer               0
  indexFiles              index.php, index.html
}

rewrite  {
  enable                  1
  autoLoadHtaccess        1
}

Add a Listener on Port 80

In the OpenLiteSpeed panel:

  1. Listeners → Add
  2. Port: 80, IP: ANY
  3. Map to the virtual host you created.

Step 6: Install WordPress

Download and extract WordPress into the document root:

cd /tmp
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
sudo mv wordpress/* /var/www/mydomain.com/html/
sudo chown -R nobody:nogroup /var/www/mydomain.com/html/
sudo find /var/www/mydomain.com/html/ -type d -exec chmod 755 {} \;
sudo find /var/www/mydomain.com/html/ -type f -exec chmod 644 {} \;

Configure wp-config.php

cd /var/www/mydomain.com/html/
sudo cp wp-config-sample.php wp-config.php
sudo nano wp-config.php

Update these lines:

define( 'DB_NAME', 'wordpress_db' );
define( 'DB_USER', 'wp_user' );
define( 'DB_PASSWORD', 'StrongPassword123!' );
define( 'DB_HOST', 'localhost' );
define( 'DB_CHARSET', 'utf8mb4' );

Generate unique security keys from https://api.wordpress.org/secret-key/1.1/salt/ and paste them into the file.

Restart OpenLiteSpeed:

sudo systemctl restart lsws

Navigate to http://mydomain.com and complete the WordPress graphical installer.


Step 7: Install SSL with Let's Encrypt

SSL is essential for any production WordPress site. Install Certbot:

sudo apt install certbot -y

Obtain the certificate in standalone mode:

sudo systemctl stop lsws
sudo certbot certonly --standalone -d mydomain.com -d www.mydomain.com
sudo systemctl start lsws

Certificates are saved to /etc/letsencrypt/live/mydomain.com/.

In the OpenLiteSpeed panel, add a Listener on port 443 and configure:

  • Private Key: /etc/letsencrypt/live/mydomain.com/privkey.pem
  • Certificate: /etc/letsencrypt/live/mydomain.com/fullchain.pem

Learn more about managing SSL certificates on our SSL certificates page.


Step 8: Enable LSCache for WordPress

LSCache is the primary performance advantage of OpenLiteSpeed. To activate:

  1. In the WordPress dashboard (wp-admin), go to Plugins → Add New
  2. Search for LiteSpeed Cache and install/activate the plugin
  3. Navigate to LiteSpeed Cache → Cache → Enable Cache: ON
  • Cache TTL: 604800 (7 days for static content)
  • Browser Cache: ON
  • Object Cache: ON
  • Image Optimization (LQIP): ON
  • CSS/JS Minify: ON
  • Lazy Load Images: ON

Verify cache headers are working:

curl -I http://mydomain.com | grep -i 'x-litespeed'

You should see:

X-LiteSpeed-Cache: hit

Step 9: Additional Production Optimisations

Increase PHP Memory Limit

sudo nano /usr/local/lsws/lsphp82/etc/php/8.2/litespeed/php.ini

Update these values:

memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_vars = 3000

Enable Gzip/Brotli Compression

In the OpenLiteSpeed panel:

  • Server Configuration → Tuning → Compression
  • Enable Enable Compression and Brotli Compression

Set Up Automatic SSL Renewal

sudo crontab -e

Add this line:

0 3 * * * certbot renew --quiet --pre-hook "systemctl stop lsws" --post-hook "systemctl start lsws"

If you'd prefer to hand off server management entirely, CLIQHOST offers professional server management services to handle your infrastructure.


Step 10: Test Your Setup

After configuration, benchmark your site with:

  • Google PageSpeed Insights — score and recommendations
  • GTmetrix — TTFB and waterfall analysis
  • WebPageTest — real multi-location comparison

Run a quick load test with ab (Apache Benchmark):

sudo apt install apache2-utils -y
ab -n 1000 -c 50 http://mydomain.com/

On a CLIQHOST NVMe VPS with LSCache active, cached page TTFB should be under 100 ms.


Common Issues and Solutions

WordPress Redirects Infinitely After Enabling SSL

Add this to wp-config.php before /* That's all, stop editing! */:

define('FORCE_SSL_ADMIN', true);
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) {
    $_SERVER['HTTPS'] = 'on';
}

.htaccess Files Are Not Being Read

Ensure your virtual host configuration has autoLoadHtaccess 1 in the rewrite section.

503 Error on PHP Requests

Check the number of running LSPHP processes:

ps aux | grep lsphp

Increase Max Connections under Server Configuration → External App → lsphp in the admin panel.


Conclusion

OpenLiteSpeed with WordPress is one of the most performant combinations available today for Linux-hosted sites. Compared to the classic LAMP stack, you get native LSCache, HTTP/3 support, minimal resource consumption, and an intuitive admin panel — all at zero licensing cost.

For the best results, this stack shines on fast storage. Explore SSD VPS or NVMe VPS plans from CLIQHOST, designed for demanding web workloads. If you'd rather focus on your site than on the server, our server management team can take care of the entire infrastructure.

Have questions or need assistance? Contact us — we're here to help.

SHARE
// what clients say

What Our Clients Say

Real reviews from customers who trust CLIQHOST for performance, reliability and expert technical support.

★★★★★

"We moved our online shop from a foreign host and the difference is night and day — pages load instantly and support replies in minutes, in Romanian."

AM
Andrei M.
eCommerce owner · Chișinău
★★★★★

"Migrated 12 client sites to CLIQHOST. Free migration, zero downtime, and the cPanel setup is exactly what my team needed. Highly recommend."

EV
Elena V.
Web agency · Bălți
★★★★★

"Our NVMe VPS handles traffic spikes without a sweat. Full root, local datacenter, and billing in MDL — everything we wanted from a provider."

DC
Dmitri C.
SaaS founder · Chișinău