The wordpress cloudflare speed optimization and combining web server infrastructure with OpenLiteSpeed is a matter of survival for business websites in 2026. This article summarizes a real-world case study: optimizing page load speed for a WordPress website running on OpenLiteSpeed (CyberPanel) + Cloudflare, while in parallel cleaning up and re-checking the tracking system (GA4, Facebook Pixel, Microsoft Ads) when switching to server-side running via Cloudflare Zaraz.

If you are a marketer who needs to understand why a page loads slowly or why a tag-checking tool reports errors, or a developer who needs a specific tuning checklist, this article is for you.

1. Initial Problem: a "lightweight" font file that still takes 2 seconds to load

It all began with a very specific observation on the Network of Chrome DevTools: font file Gilroy-Regular.woff2 weighs only 26KB but takes up to 2 seconds to display, while the VPS running 8 cores / 16GB RAM barely has any load at all.

This is the first lesson for both marketers and developers: “Spare server resources” does not equal “a fast website”. Loading speed for a given resource depends on how the browser queues, detects, and prioritizes that resource, not just on the CPU/RAM that is still free.

Read the Timing table to see where the “disappeared” time goes

When clicking a request in the Network tab, Timing shows which stage the time is being spent on:

  • Stalled: The browser is ready to send the request but must wait in a queue (due to the limit on concurrent connections/streams).
  • Waiting for server response (TTFB): Time it takes for the server to respond with the first byte.
  • Content Download: The actual content loading time.

In this case study, the font file takes just 0.3ms to load its content — the entire 2 seconds are spent in Stalled and TTFB, meaning the problem lies in queued and discovered late, not the file size or the server bandwidth.

Two Root Causes

First, the page makes too many requests at once (234 requests for a homepage, instead of the recommended 30–60). HTTP/2 connections have a limit on the number of concurrent streams, so when hundreds of image/JS/CSS files arrive at the same time, files that come later, such as font files, are pushed into a queue.

Monday, the font is not declared early. The browser only becomes aware of the font file after: finishing loading the HTML → finishing loading the font management plugin's CSS → parsing the CSS → finding @font-face → only sends the font request late. Because it is “discovered late,” this request is always placed at the back of the queue.

Lessons for marketers: when briefing a designer/developer about "slow web loading", don't just say "too slow". Attach a screenshot of the Network tab and the Timing column. That is the common language that helps developers diagnose the problem correctly instead of guessing.

2. Quick fix: Preload font and font-display: swap

The most direct way to wordpress cloudflare speed optimization in font display is “preloading”, which tells the browser about the font file as soon as it receives the HTML, rather than letting it discover the file through CSS.

This tag inserts into , telling the browser to load the font in parallel with the HTML instead of waiting for the CSS.

Additionally, combine with font-display: swap in the declaration @font-face:

@font-face{ 
  font-family: 'Gilroy-Regular';
  src: url('font.woff2') format('woff2');
  font-display: swap;
 }

swap helps text display immediately using the system font while the custom font finishes loading, avoiding the "disappearing text" phenomenon (FOIT — Flash of Invisible Text).

On WordPress using LiteSpeed Cache, you can do this without touching code: go to LiteSpeed Cache → Page Optimization → Preload, paste the font file URL into the Preload Fonts box.

Practical notes: this step helps reduce the loading time of the font file alone, but if the page still has hundreds of total requests, the overall speed will not noticeably improve. This is only step 1 in a chain of optimizations.

wordpress cloudflare speed optimization

3. Reduce the total number of requests: the root cause of queue bottlenecks

Google's general optimization standard for a page is around 30–60 requests. A page with 234 requests will almost certainly experience queue congestion regardless of how powerful the server is.

Tasks to Do in LiteSpeed Cache → Page Optimization:

Settings Effect
CSS Combine Combine dozens of small CSS files into 1–2 files
JS Combine Combine separate JS files (slider, animation, plugin…) into 1 file
JS Deferred Defer Non-Essential JS Until After the Page Has Rendered
Lazy Load Images Load images only when scrolled into view, especially for below-the-fold images
Font Display Optimization Domain management and DNS configuration are the vital foundation that helps businesses ensure stable and secure online presence. Swap

In addition, small icons in the form of .png should switch to Inline SVG or SVG sprite instead of calling hundreds of separate image files — each image file is a request, and every request has a cost (DNS, TCP/TLS handshake, queuing).

4. Tuning the Cloudflare Layer: What to Enable

The Cloudflare Dashboard (including the Free plan) has several settings that directly affect speed:

Network:

  • HTTP/3 (with QUIC) — eliminates the Head-of-Line Blocking inherent in TCP/HTTP2.
  • 0-RTT Connection Resumption — reduces handshake latency when users return to the page.

Speed → Optimization:

  • Early Hints (103) — Cloudflare sends preload hints to the browser as soon as the request arrives, even before the WordPress server finishes processing the HTML.
  • Auto Minify (JS, CSS, HTML) — if not yet enabled in LiteSpeed Cache.
  • HTTP/2 Prioritization.

Caching → Configuration:

  • Browser Cache TTL: select “Respect Existing Headers” or set 1 month/1 year for static resources.
  • Development Mode: make sure it is OFF (turning it on by mistake will disable all caching).

These are all one-time settings that do not require ongoing monitoring — suitable for marketers/administrators to do themselves without developer intervention.

5. Common pitfall: Rocket Loader conflicts with caching plugins

This is the most noteworthy part for sites already using powerful cache plugins such as LiteSpeed Cache or Super Page Cache for Cloudflare.

Rocket Loader is a Cloudflare feature that defers JavaScript loading to speed up the initial render. It sounds reasonable, but when the website already has a caching plugin that handles JS combining and deferring on its own, Rocket Loader ends up adds an extra intermediate layer (rocket-loader.min.js) to block and reschedule all scripts — causing the following behavior:

  • All JS files are held back, waiting ~800ms before they start loading (appearing as “Pending” simultaneously in the Network tab).
  • Script execution order conflicts with cache plugins may cause interface errors: sliders not running, menus freezing, icons misaligned.

General principles: if the website already uses a comprehensive caching plugin (LiteSpeed Cache, Super Page Cache, WP Rocket…), should turn off Rocket Loader on Cloudflare (Speed → Optimization → Rocket Loader → OFF) and let the cache plugin handle combining/deferring JS. Two tools that both "fix" the same issue usually create conflicts rather than adding up their benefits.

6. Deep server-level tuning: OpenLiteSpeed (for developers)

If latency persists after optimizing at the WordPress and Cloudflare layers, the next step is fine-tuning OpenLiteSpeed itself (via the WebAdmin Panel, usually on port :7080 on CyberPanel).

Server Configuration → Tuning → Connection:

  • Max Connections / Max SSL Connections: raise it to a sufficiently large value (for example 10.000–30.000) to avoid bottlenecks at the connection layer.
  • Max Keep-Alive Requests: increase it from the default (usually 100–1000) to 10.000 — helps the browser keep a single connection open to load all of the page's resources without repeatedly opening and closing SSL.
  • Keep-Alive Timeout: 5–10 seconds is reasonable.

HTTP3/QUIC:

  • Max Concurrent Streams Per Connection: this is a key setting. The default is usually limited to 100 threads, which can be raised to 300–500 so the browser can load more resources in parallel without getting "Stalled".

Static File Delivery Optimization — the part most often overlooked:

  • Max Cached Small File Size: default is 16KB. If your font/CSS/JS file is larger than this threshold, OLS will do not cache to RAM but must be read from disk every time — even though tens of GB of RAM remain available. Should be raised to 128KB.
  • Total Small File Cache Size: increase from 128M to 512M–1G.
  • Max MMAP File Size / Total MMAP Cache Size: increase accordingly so that more static files can be held in memory.

External App (lsphp):

  • PHP_LSAPI_CHILDREN: the number of child PHP processes handling requests in parallel; can be set to 150 if plenty of RAM remains.
  • PHP_LSAPI_MAX_REQUESTS: 10.000.

After making the changes, always remember Graceful Restart to let OLS reload its configuration without interrupting current connections.

Important notes: these settings only deliver their full effect after have already reduced the number of requests and disabled conflicting sources (such as Rocket Loader) in the previous step. Server tuning cannot replace optimization at the application layer.

7. Moving Tracking to Server-Side with Cloudflare Zaraz: Why and What to Keep in Mind

Alongside speed optimization, a popular approach today is moving tracking tags (Google Analytics 4, Facebook Pixel, Microsoft Ads UET…) from running client-side (embedding script gtag.js, fbevents.js, bat.js directly in the user's browser) to run server-side via Cloudflare Zaraz. You can refer to official Cloudflare Zaraz documentation to clearly understand the operating architecture.

Benefits for marketers: data is still fully recorded for the advertising platforms, but users' browsers no longer have to load a large number of additional third-party scripts. The page is lighter, faster, and less often blocked by ad-blocker.

What developers and marketers need to know during operation:

  • After switching to Zaraz, traditional client-side scripts (such as bat.js of Microsoft Ads) will no longer appear in the page source, because data is sent directly server-to-server from Cloudflare Edge to the advertising platform.
  • Therefore, legacy tag-checking tools, for example Microsoft Ads' “Test your UET tag” tool, which are designed to find JavaScript code in the browser, will report errors of the type "Tag not found" although tracking still works normally. This is not an error, but an inevitable consequence of the server-side model.
  • How to confirm tracking is still working correctly: check the live status on each platform's dashboard (for example, Microsoft Advertising shows "Tracking Status: Active"), and cross-check against the activity charts (pageviews, events) on the Zaraz Dashboard itself, rather than relying on client-side debugging tools that are outdated for this model.

Tips for marketers: when reporting tracking performance to a team or agency, it is advisable to clearly state that the system is running server-side through Zaraz, to avoid being suspected of “missing tags” merely because a testing tool is incompatible with the new architecture.

8. Trace the origin of unknown scripts in the Network tab

A common scenario: opening the Network tab and seeing requests to unfamiliar domains, for example in the form api.example-tracking.ai/beacon or cdn.example-tracking.ai/core.min.js, without knowing who inserted it.

A quick verification process that marketers and developers can perform themselves:

  1. Check the Initiator column in the DevTools Network tab — this column shows exactly which file or source initiated the request (a script on the page, or a browser extension).
  2. Open the page in an Incognito window and disable all extensions. If the unfamiliar script disappears, the cause comes from browser extension (usually SEO utilities, rank checkers, or AI tools) rather than from the website itself.
  3. If the script is still present in incognito mode, continue checking in server source code (view-source) and the list active WordPress plugin — many plugins automatically insert their own tracking scripts from service providers (such as plugins that manage LLMs.txt AI referral tracking integration).
  4. If the plugin is identified as the source, it usually includes a “Disconnect” or “Remove tracking script” option directly in its settings. Use this option instead of manually deleting the plugin, to ensure that both server-side and browser-side scripts are fully removed. Then remember Purge Cache for changes to take effect immediately.

For Cloudflare's own scripts specifically (for example static.cloudflareinsights.com/beacon.min.js), this is Cloudflare Web Analytics — a free analytics tool that is automatically injected at the CDN layer. It can be turned off at Cloudflare Dashboard → Analytics → Web Analytics → Settings → JS Snippet if it is not needed.

9. Regarding the Report-To / NEL header — not a concern

If you see a header in the form:

{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=..."}]}

This is the NEL (Network Error Logging) — an HTTP header standard that Cloudflare automatically adds to every website using the Cloudflare proxy. Purpose: if the browser encounters a connection problem (network drop, DNS error…), it silently sends an error report to Cloudflare to diagnose the infrastructure.

This header does not affect page load speed — it is only a single line of information in the HTTP header, and the browser only sends reports when there is an issue. It can be disabled at Cloudflare → Network → Network Error Logging if you want to tidy up the header, but it is not required.

Note the distinction: NEL is an official Cloudflare service, completely different from third-party tracking scripts. Cloudflare never inserts another provider's scripts into your website without permission.

Optimization process checklist summary

Things to do Operation Location Permission assignment
Preload font, font-display: swap page / LiteSpeed Cache → Preload Developer or marketer with admin rights
Combine CSS/JS, Lazy Load, JS Deferred LiteSpeed Cache → Page Optimization Developer or marketer with admin rights
Enable HTTP/3, 0-RTT, Early Hints, Auto Minify Cloudflare → Network / Speed Marketer / Administrator
Turn off Rocket Loader if a cache plugin is already in use Cloudflare → Speed → Optimization Marketer / Administrator
Tuning Max Keep-Alive, Concurrent Streams, Static File Cache OpenLiteSpeed WebAdmin Developer / Server Admin
Verify server-side tracking via the platform dashboard Zaraz Dashboard + the dashboard of each advertising platform Marketer
Identify the origin of unknown scripts via Initiator + Incognito Chrome DevTools Marketer, Dev

Optimizing a website is not about flipping a single switch, but about properly handling each layer: application (WordPress/plugin) → CDN (Cloudflare) → server (OpenLiteSpeed). Skipping a layer, or enabling overlapping features that do the same job (such as Rocket Loader and JS Combine), often produces counterproductive effects rather than synergy.

Similarly, when the tracking system shifts to a server-side model, the methods for checking and reporting tracking effectiveness must also change accordingly, relying on actual data from the platform dashboard instead of the testing tools designed for the legacy client-side model.

To learn more about comprehensive optimization solutions and full-service digital services, you can refer to our service Comprehensive Digital Marketing of DPS.MEDIA for blazing-fast web infrastructure support and the highest conversion rates.

Ý kiến bạn đọc (9)

DPS SECURITY

Đăng nhập để bình luận

Đăng nhập nhanh 1-chạm bằng Google để chia sẻ ý kiến của bạn về bài viết.

duc_it
duc_it Experts 24/08/2026

We run a fairly powerful WordPress VPS, but PageSpeed still reports slow load times. After reading the latest article, I see that simply adding more CPU/RAM doesn't fix it. Has anyone run into a case where a small font pulls TTFB and Stalled up to a full second or more?

Mê Công Nghệ
Mê Công Nghệ 24/08/2026

Absolutely right. I've encountered a font file of just over 30KB that loaded very slowly because the browser discovered it late. After preloading the critical font correctly and checking the waterfall in the Network tab, the improvement was more noticeable than upgrading the server configuration.

Kỹ Sư Quèn
Kỹ Sư Quèn 24/08/2026

Many people look at file size and conclude whether it's heavy or light, but in reality you need to examine each Timing milestone such as DNS, Queue, TTFB, and Download. Optimizing the order of resource loading is sometimes more effective than upgrading the VPS.

jamesnguyen.ga
jamesnguyen.ga 24/08/2026

I'm planning to move GA4 and Facebook Pixel to server-side tracking using Cloudflare Zaraz, but I'm worried about losing data or incorrect attribution. Has anyone actually implemented this for a sales website yet?

tranthidung1604
tranthidung1604 24/08/2026

Our team has moved part of the tracking to server-side; the biggest benefit is reducing scripts running in the browser. But we must thoroughly test purchase, value, and campaign source events before fully abandoning the old method.

leminhlaw
leminhlaw 24/08/2026

Note that server-side tracking is not automatically correct just because it is enabled. In the first few weeks, compare data across GA4, advertising platforms, and server logs to avoid discrepancies in reporting.

Nguyễn Hải Nam
Nguyễn Hải Nam 24/08/2026

The OpenLiteSpeed section is quite useful. Many marketers only look at speed scores without realizing the problem may lie in the server configuration, the cache layer, or how the browser prioritizes resources.

Hai Lúa
Hai Lúa 24/08/2026

Many websites install a bunch of cache plugins and still run slowly, that's true. This article rightly points out that you need to check which requests are causing bottlenecks, rather than just turning on automatic optimization.

baotoan1905
baotoan1905 24/08/2026

Should Cloudflare's Rocket Loader be turned on by default, guys? When I tried enabling it before, some popups and signup forms broke.

Ready to scale your revenue with DPS.MEDIA?

Partnering with 5,400+ SMEs to optimize marketing costs, elevate brand authority, and automate growth with 2026 AI technology.