OpenLiteSpeed (OLS) is the open-source edition of LiteSpeed Web Server. It’s event-driven like Nginx, understands Apache-style rewrite rules, and its server-level cache — used with the free LiteSpeed Cache WordPress plugin — makes it a popular choice for fast WordPress hosting on a VPS.
What makes it different
- LSCache: full-page caching inside the web server, controlled by the WordPress plugin (purges on post updates, separate caches for logged-in users, ESI).
- LSAPI PHP (LSPHP): LiteSpeed’s own PHP handler instead of PHP-FPM.
- Rewrite rules compatible with Apache’s
mod_rewritesyntax. Note: OpenLiteSpeed reads.htaccessrewrite rules, but only reloads them on a graceful restart — unlike Apache or commercial LiteSpeed, which pick up changes immediately. - WebAdmin console — a web GUI for configuration.
1. Install OpenLiteSpeed and PHP
LiteSpeed provides a repository script:
wget -O - https://repo.litespeed.sh | sudo bash
sudo apt install -y openlitespeed lsphp83 lsphp83-mysql lsphp83-common lsphp83-curl lsphp83-intl lsphp83-imagick
(Adjust the PHP version to what’s current.) Point OLS at your PHP version if needed, in WebAdmin under Server Configuration → External App.
Start the service:
sudo systemctl enable --now lsws
sudo systemctl status lsws --no-pager
OLS serves a default site on port 8088 and WebAdmin on port 7080.
2. Secure WebAdmin
Set the admin password:
sudo /usr/local/lsws/admin/misc/admpass.sh
Don’t open port 7080 to the world. Reach it through an SSH tunnel:
ssh -L 7080:127.0.0.1:7080 user@your-server
Then open https://localhost:7080 (self-signed certificate warning is expected). Or allow 7080 only from your IP in the firewall.
3. Listeners on 80 and 443
In WebAdmin → Listeners: edit the default listener to port 80, and add an SSL listener on 443. Map your virtual host to both listeners (Virtual Host Mappings → domain names).
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
4. Create a virtual host
WebAdmin → Virtual Hosts → Add:
- Virtual Host Name:
example.com - Virtual Host Root:
/var/www/example.com/ - Config File:
$SERVER_ROOT/conf/vhosts/example.com/vhconf.conf(create it when prompted) - Enable Scripts/ExtApps: Yes
In the virtual host:
- General: Document Root
$VH_ROOT/html/, Index Filesindex.php, index.html. - Rewrite: Enable Rewrite = Yes, Auto Load from .htaccess = Yes.
Create the directories and set ownership (OLS runs PHP as nobody:nogroup by default; many admins switch to a dedicated user per site):
sudo mkdir -p /var/www/example.com/html
sudo chown -R nobody:nogroup /var/www/example.com
Graceful restart after changes (WebAdmin button, or sudo systemctl restart lsws).
5. HTTPS
OLS doesn’t include an ACME client. Use Certbot in webroot mode:
sudo apt install -y certbot
sudo certbot certonly --webroot -w /var/www/example.com/html -d example.com -d www.example.com
In the SSL listener (or virtual host SSL tab), set:
- Private Key File:
/etc/letsencrypt/live/example.com/privkey.pem - Certificate File:
/etc/letsencrypt/live/example.com/fullchain.pem
Add a renewal hook that gracefully restarts OLS:
echo -e '#!/bin/sh\nsystemctl restart lsws' | sudo tee /etc/letsencrypt/renewal-hooks/deploy/ols.sh
sudo chmod +x /etc/letsencrypt/renewal-hooks/deploy/ols.sh
6. WordPress with LSCache
Install WordPress into the document root as usual (database with MariaDB — see installing WordPress for the database steps). Then:
- Install and activate the LiteSpeed Cache plugin.
- In LiteSpeed Cache → Cache, enable caching. The plugin detects OLS and uses the server-level cache.
- Optional: enable object caching with Redis or Memcached in the plugin, image optimisation and CSS/JS optimisation (test carefully).
Pages are now served from the server cache without touching PHP for anonymous visitors.
Quick one-click alternatives
LiteSpeed offers scripts (and many VPS marketplaces offer images) that install OLS + MariaDB + WordPress in one go. Convenient for a quick start; the manual route helps you understand and maintain the setup.
Things to keep in mind
.htaccesschanges need a graceful restart to take effect on OLS.- Some Nginx- or Apache-specific tutorials won’t map 1:1; OLS configuration lives in WebAdmin or its config files.
- Commercial LiteSpeed Enterprise adds full
.htaccesscompatibility and other features; OLS is free.
OLS vs Nginx for WordPress
With page caching configured properly, Nginx (FastCGI cache or a caching plugin) and OLS + LSCache are both very fast. OLS’s advantage is the tight integration of cache and plugin (smart purging, logged-in user caching) with little setup. Nginx’s advantage is ubiquity and documentation. See Nginx vs Apache and WordPress cache plugins compared.
Our WordPress VPS plans give you root access to run OpenLiteSpeed, Nginx or Apache — your choice.