LiteSpeed: Speed up WordPress on Coolify – 100/100 PageSpeed

Hey there! 👋
If you’ve ever wondered how to make your WordPress site load blazingly fast, you’re in the right place. Most people think the answer is to buy a caching plugin like WP Rocket, but here’s the truth: LiteSpeed Cache is free, built directly into the LiteSpeed server itself, and can outperform many paid solutions when properly configured.

In this guide, I’ll show you step by step how I turbocharged my own WordPress running on Coolify. We’ll combine OpenLiteSpeed, the LiteSpeed Cache plugin, a clean file layout, smart logging, and optimized server configs to create a setup that’s not only fast but also stable and maintainable.

By the end, you’ll know exactly how to reach that magical 100/100 PageSpeed score, improve your SEO, and keep your server ready for traffic spikes. Let’s dive in. 🚀

Screenshot showing 100/100 Google's PageSpeed result

The goal is simple — a blazing-fast WordPress that can hit 100/100 in PageSpeed Insights (especially on mobile) and lift your SEO.

Let’s get it done. 🚀

Already have WordPress on Coolify?

Perfect — we’re not reinstalling it from scratch.
If you need the base setup, I covered that here: Installing & Configuring WordPress with MySQL on Coolify. After that, come back to turbocharge it. 😉


Before we start (do this!)

  • Back up everything. Dump the database and copy your WordPress files somewhere safe.
  • Snapshot your current config. If you map volumes on the VPS, archive them before editing.
  • Have shell access to the server where Coolify runs.

1) Create a clean folder structure

Let’s assume your current files live here:

Bash
/var/wordpress-sites/website.com

I’m going to temporarily move them out, create a tidy layout, and then place WordPress into html/.

Target structure:

Bash
/var/wordpress-sites/<YOUR_SITE>/
├── html/        # WordPress files
├── conf/        # OpenLiteSpeed config
├── admin-conf/  # OpenLiteSpeed admin config
├── logs/        # OpenLiteSpeed logs

Commands:

Bash
# 1) Move current files to a temp area
sudo mkdir -p /var/wordpress-sites/temp
sudo rsync -a /var/wordpress-sites/website.com/ /var/wordpress-sites/temp/

# 2) Create the final structure
sudo mkdir -p /var/wordpress-sites/<YOUR_SITE>/{html,conf,admin-conf,logs}

# 3) Put WordPress files into html/
sudo rsync -a /var/wordpress-sites/temp/ /var/wordpress-sites/<YOUR_SITE>/html/

# 4) Clean up
sudo rm -rf /var/wordpress-sites/temp

Replace <YOUR_SITE> with your domain (e.g., website.com). Easy. 🙂


2) Coolify: stop the WordPress resource and set domains

Open your WordPress resource → Stop.
Then go to Services → Settings and set domains.

If you have www. redirection configured (from www.website.com to website.com) you only need this:

Bash
https://website.com:80

If you want to handle both domains (with and without www.) please set this:

Bash
https://website.com:80,https://www.website.com:80

:80 means that the traffic will be redirected from HTTPS to port 80 (HTTP) inside litespeed container.
Save. ✅

Screenshot showing Coolify dashboard with WordPress+LiteSpeed configuration

3) Switch the container to OpenLiteSpeed

In your WordPress resource, click Configuration → Edit compose file, and replace the content with:

Bash
services:
  wordpress:
    image: 'litespeedtech/openlitespeed:1.8.4-lsphp84'
    volumes:
      - '/var/wordpress-sites/<YOUR_SITE>/html:/var/www/vhosts/localhost/html'
      - '/var/wordpress-sites/<YOUR_SITE>/conf:/usr/local/lsws/conf'
      - '/var/wordpress-sites/<YOUR_SITE>/admin-conf:/usr/local/lsws/admin/conf'
      - '/var/wordpress-sites/<YOUR_SITE>/logs:/usr/local/lsws/logs'
    environment:
      - SERVICE_FQDN_WORDPRESS
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1']
      interval: 10s
      timeout: 10s
      retries: 10
    labels:

4) Optional: CrowdSec (if you follow my hardening guide)

If you secured Coolify with CrowdSec and a Traefik middleware, replace the empty labels: with:

Bash
    labels:
      - coolify.traefik.middlewares=crowdsec@file

If you also enabled an hCaptcha bouncer in your setup, keep that config as-is. 🧢

Free bonus content!

Want my exact configs and settings, to hit 100/100 faster and for free?
Sign up for my newsletter!
I prepared a subscriber-only “Coolify OLTS Kit” section with update instructions, whole httpd_config.conf + docker.conf and my field-tested OpenLiteSpeed Cache settings.
Subscribe to my newsletter and grab link to the bonus page! 🚀


5) .htaccess: keep it minimal and ordered

OpenLiteSpeed reads .htaccess, but with limits:

  • You can use rewrite rules and LSCache directives (CacheEnable, CacheDisable, CacheLookup, E=Cache-Control).
  • You cannot enable the cache engine globally from .htaccess — that’s done in server/vhost config.
  • LSCache rules must come before WordPress rules or they won’t apply.

If your html/.htaccess contains rules from other caching plugins (W3TC, WP Super Cache, etc.), remove them. It’s best to just make a backup of the .htaccess file and delete it completely – LiteSpeed will rebuild it.


6) HTTPS strategy: TLS at Coolify, HTTP inside the container

Traefik (Coolify) handles HTTPS automatically, so inside the WordPress container we will talk by plain HTTP.
That means we disable OLTS’s internal HTTPS listener so there’s no double TLS or port confusion. 🔧

Edit OpenLiteSpeed configs on the host (they’re mapped to your conf/ path):

Bash
# Main server config
sudo nano /var/wordpress-sites/<YOUR_SITE>/conf/httpd_config.conf
  • At the bottom: comment out or remove any listener that uses HTTPS/443.
  • In the vhTemplate docker { ... } block: remove/disable any HTTPS bindings.

Then:

Bash
# Template config
sudo nano /var/wordpress-sites/<YOUR_SITE>/conf/templates/docker.conf
  • Comment out the whole vhssl section.

This keeps everything HTTP behind Traefik while your visitors still get full HTTPS at the edge. 🔒


7) Fix potential timeouts under load: LSAPI children

If you see errors like this in stderr.log:

Bash
[UID:33][40] Reached max children process limit: 10, extra: 0, current: 10, busy: 10, please increase LSAPI_CHILDREN.

bump the PHP workers:

Bash
sudo nano /var/wordpress-sites/<YOUR_SITE>/conf/httpd_config.conf

Add (or update) this block:

Bash
extProcessor lsphp {
    maxConns                        50
    env                             PHP_LSAPI_CHILDREN=50
}

This prevents avoidable 504s when traffic spikes. 🏎️
I recommend doing it preventively – now


8) Start and test

Back in Coolify, Start / Deploy your WordPress resource.

If something’s off, check OpenLiteSpeed logs mapped to the host:

Bash
tail -f /var/wordpress-sites/<YOUR_SITE>/logs/error.log
tail -f /var/wordpress-sites/<YOUR_SITE>/logs/stderr.log

You can also temporarily enable WP debug (don’t leave this on in production):

PHP
// wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);
define('SAVEQUERIES', false);

Give it a minute to warm up, then load your site. You should be good. ✅


9) WordPress: install and tune LiteSpeed Cache

Screenshot showing installation of LiteSpeed plugin

Inside WP Admin:

  1. Install & activate the LiteSpeed Cache plugin.
  2. Optimization preset: pick one of the built-in presets as a starting point.
  3. Connect QUIC.cloud for image optimization, CSS/JS tuning, and CDN options.
  4. Set Server IP (in LSC > General) so the plugin can properly call back to your site behind a reverse proxy.
  5. Configure CDN
    • Using Cloudflare?
      • Generate the token. In Cloudflare → API Tokens create the WordPress template token scoped to your Account and specific Zone (your domain).
      • Paste that token into the LiteSpeed plugin’s Cloudflare integration to purge CF cache automatically after publishes.

I personally use the “Advanced” preset.
But you can set test also HTML/JS/CSS minification or image optimization (lossless or mild lossy).
Start conservative, test, then crank it up. ⚙️


10) Optional quick wins for 100/100

  • Remove heavy page builders or unused plugins.
  • Serve WebP images (QUIC.cloud from LSC will do this automatically).
  • Lazy-load below-the-fold images (LSC handles it).
  • Preload critical CSS and defer render-blocking JS (again, start with LSC presets).
  • Use a lightweight theme.
  • Keep your homepage lean (fewer queries, fewer 3rd-party scripts).
  • Make sure your CDN (CF or QUIC.cloud CDN) is actually enabled. 🌍

11) Log rotation (don’t let logs eat your disk)

OpenLiteSpeed logs can grow fast. Rotate them at ~10MB and keep 5 copies:

Bash
sudo nano /etc/logrotate.d/<YOUR_SITE>-litespeed

Paste:

Plaintext
/var/wordpress-sites/<YOUR_SITE>/logs/localhost.access.log \
/var/wordpress-sites/<YOUR_SITE>/logs/error.log \
/var/wordpress-sites/<YOUR_SITE>/logs/stderr.log \
/var/wordpress-sites/<YOUR_SITE>/logs/lsrestart.log {
  size 10M
  rotate 5
  missingok
  notifempty
  copytruncate
  extension .log
  maxage 14
}

Force a test run:

Bash
sudo logrotate -f /etc/logrotate.d/<YOUR_SITE>-litespeed

That’s it — safe and tidy. 🧹


12) Reality check: PageSpeed time

Open PageSpeed Insights, test both desktop and mobile. With LSCache fully enabled, QUIC.cloud doing its job, and a lean theme, 100/100 is absolutely reachable. If you’re close but not perfect, review Step 10 and audit any third-party scripts (pixels, chat widgets, heavy embeds) — they’re usually the last blockers. 📈


Wrap-up

We didn’t just flip a switch — we rebuilt the stack to favor speed: OpenLiteSpeed, LiteSpeed Cache, clean .htaccess, proper TLS at the edge, tuned PHP workers, and log hygiene. This combo is fast, resilient, and friendly to PageSpeed and Core Web Vitals. Now ship content, not delays. 🙌

Join the Newsletter

Subscribe to get bonus content. Don’t miss new articles.

    We won’t send you spam. Unsubscribe at any time.

    3 thoughts on “LiteSpeed: Speed up WordPress on Coolify – 100/100 PageSpeed”

    1. Thanks for this! This has been very helpful.

      I do have a question though, how would one access the OpenLiteSpeed Admin console if it’s set up this way? Do we need to somehow expose a different port for that?

    Leave a Comment

    Your email address will not be published. Required fields are marked *

    Scroll to Top