Skip to content

Example scenario · WordPress performance optimization · publisher CMS · in-place rebuild

Same hosts, same theme, dramatically faster: rebuilding Core Web Vitals on a national publisher

A national Canadian publisher had watched LCP, INP and CLS collapse over two years of plugin accretion and a 2025 redesign. We were brought in to make the same site fast again — without a migration, a replatform, or a front-end rewrite. Here is what we found and what we changed.

Illustrative client profile: National Canadian publisher · ~5.8M sessions/mo · WordPress + custom theme. This example scenario shows how we approach the work; it does not describe a specific client, and its figures are illustrative.

Outcomes

Monthly traffic
~5.8M sessions/mo
Uptime
99.99%
Response p95
p95 240 ms (was p95 1.8s)
Tickets
−54% editorial-side performance complaints
Incident response
No new on-call rotation · plugin escalation runbook in place
MRR
Retainer · Managed Cloud Ops
Infra cost change
Flat — same hosts, same plan tier

The director of digital sat across from us in their newsroom in early February 2026 and laid two printouts side by side. One was a CrUX dashboard from the Search Console of their two flagship properties; the other was a 12-month organic-traffic chart for the same domains. The CrUX dashboard was a wall of red and amber. Mobile Largest Contentful Paint was at 4.9 seconds at the 75th percentile, sitting in the “poor” bucket for nine of the last twelve months. Cumulative Layout Shift had drifted up to 0.24. Interaction to Next Paint, which had only become a Core Web Vital in March 2024, had never crossed into “good” on mobile. The organic-traffic chart was the corresponding picture from the other side of the table: a 14% decline year over year on the two highest-traffic verticals, almost entirely from mobile.

We were not the agency who built the late-2024 redesign. We were the operator the publisher had retained at the end of 2025 for environment management — patching, backups, alerting, the long unglamorous tail of running a high-traffic WordPress property. The performance rebuild was scoped as a 10-week project on top of the retainer: same hosts, same theme, same plugin philosophy. Make it fast. Do not redesign anything. Do not migrate.

Ten weeks later, mobile LCP at the 75th percentile was 1.4 seconds. INP was 180 ms. CLS was 0.02. The site looked identical. The organic-traffic chart began to invert in week seven and was up 18% on the same verticals at the 90-day mark.

At a glance

  • National publisher, two flagship WordPress properties, ~5.8M sessions/month aggregated, mobile-dominant readership.
  • Mobile LCP 4.9 s → 1.4 s. CLS 0.24 → 0.02. INP 480 ms → 180 ms. TBT 1.2 s → 240 ms. All measured at the 75th percentile from CrUX field data over a rolling 28-day window, post-optimization.
  • p95 TTFB at the application tier: 1.8 s → 240 ms. Same hosts. Same hosting plan. No migration.
  • Organic traffic on the two highest-traffic verticals: −14% YoY pre-engagement → +18% versus the pre-engagement baseline at 90 days. Mobile bounce rate down 22% in the same window.
  • Editorial-side performance complaints (the “the new article page is slow” tickets that had been arriving multiple times a week) down 54%. The remaining ones are mostly legitimate edge cases on archive pages we have flagged for a second pass.
  • Infrastructure cost: flat. Same plan tier with the same host. The work was operator engineering, not capacity.

The situation

The two properties run on a self-managed pair of dedicated servers at a Canadian regional host the publisher has been with for six years. PHP 8.2, MariaDB 10.6, Nginx in front. The theme is custom, built by a Montréal agency in 2024 as part of the redesign that landed in November 2024. The redesign was a real piece of design work — visually, the publisher liked it, the editorial team adopted it cleanly, the brand refresh that came with it did its job. The operational damage was unintentional and arrived gradually.

The plugin count had crept from 31 to 67 over two years. The redesign had added six plugins on its own (a page-builder shim the theme depended on for a few legacy templates, a new SEO plugin that ran in parallel with the existing one because nobody could agree which to retire, a consent-management plugin that loaded a 92 KB JavaScript bundle on every page, a tracking pixel manager that fired 14 third-party scripts before any of them were actually used, and two A/B-testing plugins for an experiment that had concluded eight months earlier and had never been turned off). The editorial team had layered on twelve more for newsletter capture, paywall metering, related-content recommendations, and a heatmap tool the analytics manager swore by but checked twice a year.

The wp_options table had grown to 31,000 rows. 4,800 of those were autoload = yes, which meant every single WordPress request on every single page was pulling roughly 14 MB of serialized options into PHP memory before the router even resolved. Object cache was technically present — Redis was running on the box — but it had been wired into WordPress through a drop-in that the previous operator had configured for a different stack two years earlier. About a third of the queries the team thought were being cached were not.

Full-page caching, on paper, was Nginx’s fastcgi_cache. In practice the cache was being bypassed by a Cache-Control: private header that the consent-management plugin emitted on every uncategorized visitor, which was most of them.

What forced the timing

The director of digital is a former working journalist and a careful operator. She had been raising the performance issue for the better part of a year — first with the agency that built the redesign, who quoted a four-month engagement to revisit the theme, and then with their previous infrastructure vendor, who quoted a migration off the current host and onto a managed WordPress platform. Both of those answers were probably correct in some long-run sense. Neither of them solved the problem in front of her.

What forced the timing was a quarterly review with the publisher’s commercial director. Programmatic ad revenue on the two flagship properties had fallen by a measurable margin in Q4 2025. The ad-tech vendor’s own diagnostics flagged the cause as ad latency and viewability — the LCP of the article-page hero (which sat above the highest-revenue ad slot) was so slow that the slot was routinely failing the IAB viewability threshold before the user scrolled past. The commercial director gave the digital team a quarter to fix it. That conversation happened on a Tuesday. We had the first call Wednesday morning.

What the audit found

Two weeks. No code changes. The audit deliverable was a 28-page document the director of digital could put in front of her CTO and her commercial director and have both walk away with the same picture of what was wrong. Five things mattered.

Render-blocking critical path was the dominant problem. The article page emitted 19 render-blocking JavaScript files in the document head, totalling 1.4 MB uncompressed (about 480 KB gzipped). Eleven of them were third-party tracking, analytics, or A/B-testing scripts that the consent banner was supposed to be gating but was not, because the gating plugin was loading itself synchronously and then dispatching its dependents asynchronously, which meant the page paint was already blocked on the gate before it had decided what to gate. The 92 KB consent bundle alone was the single biggest cost on first paint. CSS was its own problem — the redesign theme shipped 240 KB of CSS in a single file, of which approximately 38 KB was actually used on the article template.

The LCP image was being pushed down the priority queue. The hero image on the article template was the LCP element. It was lazy-loaded with loading="lazy", no fetchpriority hint, and no explicit dimensions. The browser was discovering it late, decoding it after eight or nine other unimportant images had been queued, and then triggering a layout shift on arrival because the placeholder had no aspect ratio reserved. CLS was largely this — the same hero image and the ad slot below it, both layout-shifting on first interaction.

INP was getting killed by the related-content widget. The recommended-articles strip below each article body was rendered by a plugin that ran a 320 ms JavaScript loop on every scroll event without throttling. On mid-range Android, the main thread blocked long enough on each scroll to push INP into the “poor” bucket by itself. The widget was not doing anything that justified that cost — it was sorting a precomputed list of 12 article IDs.

wp_options autoload was a TTFB tax on every page. 14 MB of serialized PHP being unserialized at the start of every request meant 220 ms of TTFB even on a fully primed application tier. Two-thirds of the autoloaded rows were transients that had been written without expiry, abandoned plugin settings from extensions that had been deactivated but not removed, and a backup plugin’s restore log that had been writing one row per backup run for 18 months.

Database-level: a misbehaving plugin was generating N+1. The newsletter-capture plugin’s “have they subscribed?” check ran a separate SELECT against wp_usermeta for every related-article link rendered on the page. On a typical article page that was 14 queries. On the homepage that was 80 queries. The plugin’s author had been asked about it on the support forum in 2023 and had not responded. The plugin was otherwise functional and the editorial team relied on it; we did not have permission to swap it out, only to stop it from being expensive.

The plan

Five workstreams, ten weeks, sequenced so the first two weeks of work moved the field-measured Core Web Vitals visibly before we touched anything risky. The publisher’s stakeholders needed to see the dial move; they had been told twice already that performance work would take a quarter.

Workstream one: plugin audit and removal. We sat with the editorial team for three afternoons in week three and went through the active plugin list one at a time. Twenty-one plugins were retired. Of those, six had been added during the redesign and were either redundant (the second SEO plugin, the parallel analytics plugin) or genuinely unused (both A/B-testing plugins, the heatmap tool that had not been opened in seven months). Eight had been added at various points by editorial staff who had since left the building; their settings still occupied space in wp_options long after the plugin itself had stopped doing useful work. The remaining seven were replaced — the page-builder shim was no longer needed once we audited the legacy templates it serviced (two of them rendered cleanly without it, one was decommissioned, one was rebuilt as a custom block in an afternoon), and the tracking-pixel manager was replaced with a small custom mu-plugin that loaded exactly the four pixels the commercial team actually wanted, gated correctly by consent.

Workstream two: render-blocking critical path. All non-essential JavaScript was deferred or async-loaded. The consent-management plugin was reconfigured (with cooperation from its vendor — they were responsive once we sent them a flame graph) to defer its own bundle below the fold and to use a lighter pre-consent placeholder. Critical CSS for the article template, the homepage, and the section-front template was extracted, inlined in the document head, and the rest of the stylesheet was loaded with media="print" + onload rewriting to non-blocking. Font loading was switched to font-display: swap and the two webfonts the brand actually needed were preloaded with <link rel="preload" as="font" crossorigin>. The LCP image got fetchpriority="high", explicit width/height, an aspect-ratio-reserved placeholder, and was removed from the lazy-load list. Below-the-fold images stayed lazy. We added <link rel="preconnect"> to the four origins that mattered (CDN, image origin, ad exchange, consent vendor) and removed eleven <link rel="dns-prefetch"> tags pointing at services that no longer ran.

Workstream three: image pipeline. The publisher’s images were already in WebP for newer uploads but had a long tail of legacy JPEGs. We did not re-encode the archive — that was a separate project, scheduled for the Q3 maintenance window — but we did fix the responsive srcset generation, which was emitting four sizes when it should have been emitting eight, and we forced AVIF on the hero image template specifically, which is where the LCP win compounded with the priority hint. The hero image got proper sizes attributes and the cropped variant used in mobile-portrait viewports was 38% smaller than the desktop variant the responsive picture had been falling back to.

Workstream four: caching, properly. Redis object cache was rewired with the well-maintained drop-in that matches the Redis instance the host actually exposes, with persistent connections, a WP_CACHE_KEY_SALT so the two properties did not collide in cache, and a sensible group-flush configuration. Nginx microcaching was reconfigured to ignore the consent header for anonymous visitors and to vary on a much narrower set of cookies. Cache hit ratio at the application tier went from approximately 41% to 96% on the article template within the first 48 hours after the change.

# /etc/nginx/conf.d/publisher-microcache.conf
fastcgi_cache_path /var/cache/nginx/publisher
  levels=1:2 keys_zone=publisher:200m max_size=4g inactive=60m use_temp_path=off;

map $request_method $no_cache_method { default 1; GET 0; HEAD 0; }
map $http_cookie $no_cache_cookie {
  default 0;
  "~*(wordpress_logged_in|wp-postpass|woocommerce_items_in_cart)" 1;
}
map $request_uri $no_cache_uri {
  default 0;
  "~*/wp-(admin|login)" 1;
  "~*/feed/" 1;
  "~*\?(.*&)?(preview|s)=" 1;
}
map "$no_cache_method$no_cache_cookie$no_cache_uri" $no_cache { default 0; "~1" 1; }

# In server {} block:
fastcgi_cache publisher;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_valid 200 301 302 60s;
fastcgi_cache_use_stale error timeout updating invalid_header http_500 http_502 http_503 http_504;
fastcgi_cache_background_update on;
fastcgi_cache_lock on;
fastcgi_no_cache $no_cache;
fastcgi_cache_bypass $no_cache;
add_header X-Cache-Status $upstream_cache_status always;

A 60-second TTL on an article page that updates once a day is unintuitive but correct: the publisher’s pattern is bursty inbound traffic from social and from the homepage, and a 60-second microcache absorbs the first-arrival stampede while still letting editorial corrections propagate in under a minute.

Workstream five: database and PHP runtime. The autoload audit moved 4,200 rows out of autoload = yes. About 1,800 of those were genuinely obsolete and were deleted; the remainder were left in place with autoload = no so the rare consumer that needed them could still find them via direct query. The serialized payload behind the autoload set dropped from ~14 MB to ~1.2 MB. We added an index to wp_postmeta(meta_key, post_id) that two of the publisher’s plugins had been quietly stalling on, identified through three days of slow-query-log review against the production replica. PHP-FPM was rebuilt with a pm = dynamic profile sized against the actual concurrency we measured during the week-four traffic baseline, opcache was given memory_consumption=384 and max_accelerated_files=24000 (the previous value, 8000, had been silently evicting cached files), and opcache.validate_timestamps=0 in production with a deploy-side cache reset on each release. The N+1 newsletter widget was contained with a per-request memoization wrapper around its lookup function — eight lines of code in a small mu-plugin — which collapsed the 80-query homepage hit to a single query.

Execution

Ten weeks. The sequencing mattered more than the work itself.

Weeks one and two were the audit, with two early wins shipped on day eight to give the team a visible signal: the LCP image got its fetchpriority and dimensions, and the heaviest single tracking script was deferred. Mobile LCP at the 75th percentile in CrUX moved from 4.9 s to 3.6 s over the following ten days — not where it needed to land, but enough that the director of digital had something to take to her commercial director the following Monday.

Weeks three through five were plugin removal and the critical-path work. Each plugin removal went through a checklist: confirm nothing in the database depended on it that we cared about, confirm no scheduled task or webhook called into it, deactivate on staging, run synthetic checks against the four highest-traffic templates, remove if clean. The two we worried about most were the consent-management plugin and the newsletter capture plugin, both of which were touching paths that mattered to the commercial team. Both were reconfigured rather than removed; both became cheaper. The remaining nineteen were deleted.

Weeks six and seven were the caching and database work. The Redis rewiring was the only change that briefly went sideways: a stale drop-in left over from the previous setup was still loaded and was double-writing to two cache namespaces, which we caught when cache hit ratio went up but TTFB did not. Twenty minutes to identify, one line to fix, no customer impact. The autoload cleanup ran against a staging clone first, the SQL was reviewed by the publisher’s CTO, and the production change was made during a Sunday 02:00 ET window with a 12-second OPTIMIZE TABLE blip that the microcache absorbed.

Week eight was image-pipeline work and the related-content widget. The widget’s 320 ms loop was replaced with an IntersectionObserver and a pre-rendered list — same output, no scroll-handler work. INP moved into the “good” bucket within five days.

Weeks nine and ten were measurement and handover. We ran a synthetic regression suite against staging on every plugin update for those two weeks, documented the new operating posture in a runbook the publisher’s editorial-operations lead now owns, and held a one-hour session with the editorial team on the three plugin patterns we did not want to see come back — heavy synchronous scripts on the document head, third-party widgets that hook into scroll events without throttling, and any plugin that wants to write its own row to wp_options with autoload = yes.

Results at 90 days

Field-measured Core Web Vitals at the 75th percentile, rolling 28-day CrUX window:

MetricPre-engagementAt 30 daysAt 90 days
Mobile LCP4.9 s2.1 s1.4 s
Mobile CLS0.240.060.02
Mobile INP480 ms220 ms180 ms
Mobile TBT (lab)1.2 s380 ms240 ms

Application-tier metrics, p95 TTFB on the article template: 1.8 s → 240 ms. Cache hit ratio: 41% → 96%. PHP worker concurrency at the same traffic level: down roughly 60% — the application stopped needing as many workers because each request was doing far less work. Same hosting plan, same host, same physical capacity.

Organic traffic on the two flagship verticals, measured against the year-prior baseline rather than the immediate pre-engagement floor: −14% YoY pre-engagement → +18% versus pre-engagement at the 90-day mark. Mobile bounce rate down 22% in the same window. The commercial director’s specific concern — programmatic ad viewability on the hero slot — moved from approximately 49% to 78% of impressions cleared the IAB viewability threshold, which she described, the second time we saw her, as “the most boring good news I have had this year.”

Editorial-side performance complaints — the steady drip of “the new article page is slow” tickets that had been arriving from the newsroom for a year — dropped 54%. The ones that remain are mostly legitimate edge cases on the archive and tag-page templates we have flagged for a second pass in the next quarter.

Infrastructure cost: flat. Same hosts, same plan. The publisher had pre-budgeted for a managed-WordPress migration that did not happen.

What we would say in hindsight

Two things, neither of which is novel.

First: the rebuild was not heroic engineering. Almost every change we made is documented somewhere on the web. What was missing was an operator with enough authority and enough uninterrupted attention to walk the full path from the field-measured Core Web Vital all the way back to the specific plugin row in wp_options that was making it slow, and then to make the call about which trade-offs were acceptable. The publisher’s internal team had been trying to do this work for a year, in fragments, between editorial deadlines. Performance work does not survive being done in fragments.

Second: the redesign was not the problem. The redesign was a fine piece of work that the publisher’s audience adopted cleanly. The problem was that nobody had been responsible for the operational consequences of the redesign once it shipped. Plugin accretion, autoload sprawl, third-party script creep — these are operational tax that compounds quietly. They do not show up in the agency’s relationship with the publisher because by the time they matter, the agency is on the next project. They show up in the operator’s relationship, if there is one.

The publisher kept their theme, their host, their plan, and their plugin philosophy. They got a substantially faster site because the work the operator did was the work the redesign did not include. That distinction — the design is one engagement, the operations are another, and both have to be staffed for a high-traffic property to stay healthy — is the thing we would put in front of any publisher in the same position.


This is an example scenario: an illustrative engagement that shows how we approach this kind of work. It does not describe a specific client, and its figures are illustrative.

Running a publisher property that is starting to feel this way? Read about our Managed Cloud Ops offer, or learn how we work with Enterprise WordPress properties.

Tell us what you're running. We'll tell you what needs to change.

Book a consult with Stack Harbor. We will review your current environment, risk points, support needs, and the best path forward.