Blazing Fast Cloud Servers

Server set-up in less than 1 minute, Instant scaling up or down as required, 99.95% uptime guaranteed, No hardware maintenance, Simple backup and monitoring, Unbeatable pricing.

Visit Website

How To Speed Up WordPress With LiteSpeed Cache + Memcached Object Cache + BunnyCDN + Cloudflare DNS

Speed up WordPress

This tutorial shows you how to set up LiteSpeed Cache and BunnyCDN, Cloudflare DNS, speed up your WordPress website, also get 100% GTmetrix Performance scores.
Demo domain: blogwp.ovh and www.blogwp.ovh
Install WordPress in www.blogwp.ovh
Set the Custom Hostname to “blogwp.ovh” in BunnyCDN dashboard

Demo Theme: Divi Theme
The VPS used in this article: DigitalOcean (1GB RAM, 1 vCore)
Get $100 of free DigitalOcean credits if you sign up through this link!
Please add your domain name to Cloudflare in advance.
Please replace www.blogwp.ovh with your own domain name.

Affiliate Disclosure: This page contains affiliate links. If you click through and purchase an item, I may earn a commission.
Nginx FastCGI Cache Vs Nginx FastCGI Cache + Redis Object Cache Vs Redis Full-Page Cache Vs LiteSpeed Cache
This article shows you page caching performance comparation: Nginx FastCGI Cache Vs Nginx FastCGI Cache + Redis Object Cache Vs Redis Full-Page Cache Vs LiteSpeed Cache

Install Divi Theme, under the Theme Options, enable Minify And Combine Javascript Files, enable Minify And Combine CSS Files, enable Static CSS File Generation.

When it comes to speed up WordPress site, caching is one of the best technology that you can use. LiteSpeed Cache is one of the most powerful free WordPress cache plugins, it is an all-in-one site acceleration plugin, featuring an exclusive server-level cache and a collection of optimization features.
LiteSpeed Cache General Features:
Free QUIC.cloud CDN Cache
Object Cache (Memcached/LSMCD/Redis) Support+
Image Optimization (Lossless/Lossy)
Minify CSS, JavaScript, and HTML
Minify inline CSS/JS
Combine CSS/JS
Automatically generate Critical CSS
Lazyload images/iframes
Responsive Image Placeholders
Multiple CDN Support+
Load CSS/JS Asynchronously
Browser Cache Support+
Database Cleaner and Optimizer
PageSpeed score optimization
OPcode Cache Support+
HTTP/2 Push for CSS/JS (on web servers that support it)
DNS Prefetch
Cloudflare API
Single Site and Multisite (Network) support
Import/Export settings
Attractive, easy-to-understand interface
WebP image format support
Heartbeat control
General Features may be used by anyone with any web server (LiteSpeed, Apache, NGINX, etc.)

LiteSpeed Cache Exclusive Features:
HTTP/2 support
HTTP/3 & QUIC support
Automatic page caching to greatly improve site performance
Automatic purge of related pages based on certain events
Private cache for logged-in users

Install LiteSpeed Cache Plugin


LiteSpeed Cache Plugin Settings
Cache tab settings
Enable Cache: ON
Cache Logged-in Users: ON
Cache Commenters: ON
Cache REST API: ON
Cache Login Page: ON
Cache favicon.ico: ON
Cache PHP Resources: ON
Cache Mobile: OFF


TTL tab settings
You can set the cache time here, but you don’t need to change it unless you have a specific reason.
Default Public Cache TTL: 604800
Default Private Cache TTL: 1800
Default Front Page TTL: 604800
Default Feed TTL: 604800
Default REST TTL: 604800


Purge tab settings
Purge All On Upgrade: ON
Serve Stale: ON


Excludes tab settings
Here you can set what to exclude from the cache, but basically you don’t have to change it.


Object tab settings
Here you can turn the object cache on and off. If the Memcached extension or Redis extension is enabled and the connection test is passed, change it to on.
Object Cache: ON
Method: Memcached
Default Object Lifetime: 360


Browser tab settings
Browser caching stores static files locally in the user’s browser, if you enable the browser cache, the cache will be saved in the user’s web browser, and you can expect faster display.
Browser Cache: ON
Browser Cache TTL: 31557600


Advanced tab settings
Instant Click: ON


CDN Settings
QUIC.cloud CDN: OFF
Use CDN Mapping: OFF
Cloudflare API: OFF
Note: in this tutorial i use BunnyCDN and Cloudflare DNS


Page Optimization > CSS Settings
CSS Minify: OFF
CSS Combine: OFF
Unique CSS File: OFF
CSS HTTP/2 Push: ON
Load CSS Asynchronously: OFF
Generate Critical CSS: OFF
Generate Critical CSS In Background: OFF
Inline CSS Async Lib: ON


Page Optimization > JS Settings
JS Minify: OFF
JS Combine: OFF
JS Combine External and Inline: OFF
JS HTTP/2 Push: ON
Load JS Deferred: OFF
Load Inline JS: Default


Page Optimization > Optimization Settings
HTML Minify: ON
DNS Prefetch Control: OFF
Remove Query Strings: ON
Load Google Fonts Asynchronously: OFF
Remove Google Fonts: ON
Remove WordPress Emoji: ON
Remove Noscript Tag: ON


Page Optimization > Localization Settings
Gravatar Cache: ON
Gravatar Cache Cron: OFF
Gravatar Cache TTL: 604800


LiteSpeed Cache Database Optimization:
Clean All
Post Revisions: Clean all post revisions
Auto Drafts: Clean all auto saved drafts
Trashed Posts: Clean all trashed posts and pages
Spam Comments: Clean all spam comments
Trashed Comments: Clean all trashed comments
Trackbacks/Pingbacks: Clean all trackbacks and pingbacks
Expired Transients: Clean expired transient options
All Transients: Clean all transient options
Optimize Tables: Optimize all tables in your database
Clean CSS/JS Optimizer: Purge all and clean all minified/combined CSS/JS data


LiteSpeed Cache Toolbox:
Purge Front Page: This will Purge Front Page only
Purge Pages: This will Purge Pages only
Purge 403 Error: Purge error pages, including 403 pages
Purge 404 Error: Purge error pages, including 404 pages
Purge 500 Error: Purge error pages, including 500 pages
Purge All – LSCache: Purge the LiteSpeed cache entries created by this plugin
Purge All – CSS/JS Cache: This will purge all minified/combined CSS/JS entries only
Purge All – Object Cache: Purge all the object caches
Purge All – Opcode Cache: Reset the entire opcode cache
Purge All: Purge the cache entries created by this plugin except for Critical CSS & LQIP caches
Empty Entire Cache: Clears all cache entries related to this site, including other web applications. This action should only be used if things are cached incorrectly.

Configure BunnyCDN and Cloudflare DNS:
Install WordPress in a subdomain for example www.blogwp.ovh
Create a BunnyCDN Pull Zone for www.blogwp.ovh in BunnyCDN dashboard
Hostname: blogwp.b-cdn.net
Origin URL: www.blogwp.ovh


Add Custom Hostname, Custom hostnames can be used instead of BunnyCDN’s default b-cdn.net hostname. Set the Custom Hostname to “blogwp.ovh”


Enable SSL for blogwp.b-cdn.net and blogwp.ovh
Force SSL for blogwp.b-cdn.net and blogwp.ovh


BunnyCDN Caching Settings:
Cache Expiration Time set to “Respect Origin Cache-Control”
Browser Cache Expiration Time set to “Match Server Cache Expiration”

CloudFlare DNS Settings:

Set up the CNAME record and A record on CloudFlare DNS, untick the orange cloud, making it DNS Only.

Type    Name	      Content	         TTL     Proxy status
A       www           your server ip     Auto    DNS only
CNAME   blogwp.ovh    blogwp.b-cdn.net   Auto    DNS only

Note: CloudFlare DNS is a very fast free DNS service provider.

To set up your WordPress website to use BunnyCDN, you need to install the BunnyCDN WordPress CDN Plugin
Click “Switch To Advanced View”


Set the CDN Domain Name to blogwp.ovh, Click “Update CDN Settings”

I use KeyCDN’s performance tool to measure the TTFB
Without CDN (www.blogwp.ovh)

With CDN (blogwp.ovh, Cache Hit, after 5 reloads)

I use loader.io load testing tool to measure how many visitors my site can handle
I use DigitalOcean’s One-Click OpenLiteSpeed WordPress, the verification file of loader.io need to be uploaded to /var/www/html


Load Test after use LiteSpeed Cache + Memcached Object Cache + BunnyCDN (tool: https://loader.io/)
Clients per second (send up to 10k requests per second over a period of 1 min)

Clients per second: 2500 1 min

Clients per second: 5000 1 min

Clients per second: 7500 1 min

Clients per second: 10000 1 min


Clients per test (send up to 10k requests per test over a period of 1 min)

Clients per test: 7000 1 min

Clients per test: 8000 1 min

Clients per test: 9000 1 min

Clients per test: 10000 1 min

Speed Tests Results
GTmetrix:

Sucuri Load Time Tester:

The speed optimization method can be summarized as: LiteSpeed Cache + Memcached Object Cache or Redis Object Cache + BunnyCDN + Cloudflare DNS

Some hosting providers that support LiteSpeed Web Server:
KnownHost Fully Managed WordPress Hosting
KnownHost Shared Hosting
InterServer Web Hosting
NameHero Web Hosting

If you have any questions, please comment below.

Copied title and URL