From Performance Bottlenecks to Lightning-Fast Delivery: Migrating a 1M-Article WordPress Portal to Headless

December 29, 2025

How a leading US legal news portal transformed page speed, scalability, and security with a headless WordPress setup built using B2Storefront.

1. Executive Summary

A major US legal news portal faced growing performance and stability problems as its WordPress setup struggled with more than one million articles, constant publishing, and massive traffic spikes. After the AI boom, the situation became even harder, with heavy bot activity pushing the server to its limits and slowing down both the website and the mobile apps connected to the same backend.

To solve these challenges, we migrated the entire platform to a headless architecture powered by B2Storefront, while keeping WordPress as the content hub. All public pages are now delivered as fast, static HTML and fully cached through Cloudflare, giving the portal sub-100ms performance and total stability even during large traffic peaks.

The WordPress backend is now protected behind Cloudflare Zero Trust, which significantly improves security. Editors continue using the same tools and workflows, but the platform is faster, more scalable, and ready for the future. This approach removed the bottlenecks of the old setup and gave the client a modern, reliable, and high-performance solution built for the AI era.

TL;DR

After the migration, the portal now serves pages in under 100ms vs 3-4 seconds before, handles over a million articles without stress, and refreshes new content in less than 30 seconds. Traffic peaks no longer cause downtime - a 100% availability since headless release, WordPress load dropped by 64%, and the backend is fully secured with Zero Trust. SEO visibility improved as pages became faster and more stable for crawlers.

2. Client Profile and Pre-Migration Architecture

The project was delivered for a major US news portal focused on legal topics and court-related updates. The platform publishes new articles throughout the day and manages a library of more than one million posts, attracting strong daily traffic and frequent visibility on Google News and other news aggregators.

How the Website Was Originally Built

The portal ran on a classic WordPress setup with multiple custom plugins, a Divi Builder powering the homepage, and Gutenberg for article pages. It was hosted on a large Azure instance and supported by an ElasticSearch layer to improve search performance.

null

The client also relied on a custom WordPress API plugin used by their iOS and Android mobile apps, meaning any slowdown on WordPress affected not only the website but also both mobile applications.

3. Key Challenges in Performance, Stability, and Security

The main issue was the platform's inability to handle sudden traffic spikes from Google News and other aggregators. These peaks often caused slowdowns or full crashes. With over one million articles, TTFB reaching 3–4 seconds, and a busy publishing schedule, the original WordPress setup couldn't deliver the required stability. The admin panel also became slow, and mobile apps were affected because they relied on the same backend.

After the AI boom, aggressive crawling from AI bots and SEO tools added even more pressure to PHP and the database, making the system unstable even during normal activity.

Security challenges made the situation harder. WordPress needed frequent updates to stay safe, but each update risked breaking custom plugins. The entire installation was publicly exposed, increasing vulnerability to scans and unwanted bot traffic.

Key challenges included:

  • Crashes during high-traffic events
  • Slow TTFB (3–4 seconds) and unstable admin experience
  • Heavy bot traffic after the AI boom
  • Mobile apps affected by backend performance
  • Security risks from a fully exposed WordPress install
  • Difficulty keeping WordPress updated without breaking functionality
null

The client needed a more stable, secure, and scalable solution without changing the editorial workflow.

4. Why Headless Was the Right Direction

The client needed a solution that could stay fast and stable during sudden traffic peaks from Google News and other aggregators. Their WordPress setup was powerful but not built for this level of scale. Every time traffic spiked, PHP and the database became overloaded, causing slow TTFB, backend delays, and sometimes full outages.

A headless approach solved this by separating content management from content delivery. WordPress remains in the background as a familiar CMS for the editorial team, while the public website runs independently on a high-performance static frontend. This removes the traditional bottlenecks of PHP, MySQL, and plugin-heavy themes, giving the portal a foundation that can handle large volumes of traffic without crashing.

Headless was also the right direction for the AI era. Modern crawlers, including Googlebot and SEO tools, can hit websites with thousands of requests in minutes. A static, fully cached frontend can absorb this traffic with no impact on WordPress or the editorial workflow.

Security Benefits of Going Headless

Moving to a headless structure also brings significant security improvements. WordPress is an open-source platform that requires constant updates, and each update can risk breaking custom plugins or existing functionality. Keeping WordPress secure while maintaining stability was a challenge for the client.

With a headless model:

  • WordPress is no longer exposed to the public
  • The attack surface is much smaller
  • Only a controlled API communicates with the frontend
  • WordPress updates become safer and less disruptive

This makes the entire system more resilient and protects the CMS from automated scans, attacks, or bot-driven traffic.

Future Scalability

A headless setup gives the client a long-term, scalable architecture. It supports large content volumes, high traffic peaks, and increases in bot activity - all without affecting the CMS or editorial operations. The platform becomes easier to maintain, easier to secure, and capable of evolving as traffic and content continue to grow.

5. Implementation and Outcomes

Building the New Headless Infrastructure

We migrated the entire website to a headless stack powered by Hugo and our B2Storefront Connector, keeping WordPress only as a backend CMS. B2Storefront acts as a connector layer that reads content from WordPress and transforms it into a structure ready for Hugo. Hugo then generates fully static HTML pages, which are extremely fast to load and easy to cache.

null

Key elements included:

  • Generating static HTML for all public pages
  • Caching everything globally through Cloudflare
  • Migrating media to Cloudflare Images
  • Keeping WordPress only as a secure backend CMS
  • Reducing PHP and database traffic to almost zero

Performance and Stability Outcomes

The new headless solution provided strong improvements across performance, uptime, and overall user experience. Traffic coming from Google News and third-party aggregators is now handled without any slowdown, and WordPress remains responsive even during the busiest periods.

null

Key outcomes included:

  • Sub-100ms TTFB for all public pages vs 3-4 seconds before
  • Stable performance during traffic peaks - 100% availability since Headless release 4 months ago
  • Backend load reduced by 64%
  • Faster and more responsive WordPress admin panel
  • Improved crawl efficiency and indexing for search engines
  • Single post pages build times under 30 seconds
  • Smooth publishing even during traffic peaks
  • No impact on backend performance
  • A platform ready for long-term scalability in the AI era
  • Hiding the entire CMS behind Cloudflare Zero Trust
  • Reducing the attack surface of an open-source WordPress install

6. Business Impact

The new headless architecture brought clear improvements across the entire platform. The website now stays fast and stable during heavy traffic peaks, including traffic coming from Google News and other aggregators. Editors work in a smoother environment, and search engines can crawl and index new content more efficiently.

Key business impacts included:

  • Consistent performance and zero outages during high-traffic events
  • Faster and more responsive WordPress admin panel for editors
  • Improved Google crawl rates and quicker indexing of new content
  • Stronger security with WordPress fully isolated behind Zero Trust
  • A modern infrastructure that supports future growth and higher content volume

Overall, the portal now operates on a much more reliable and scalable foundation, without disrupting the team's existing workflow.

7. Conclusion

The move to a headless solution transformed the portal from a high-maintenance, resource-heavy WordPress installation into a fast, scalable, and secure platform. By separating content management from content delivery, we removed the main performance bottlenecks and created a system that can easily handle large traffic peaks and the growing pressure of AI-era crawling.

The combination of Hugo, B2Storefront, Cloudflare CDN, and Cloudflare Zero Trust resulted in a stable environment where both users and editors benefit from a smoother experience. The website loads quickly, remains available during heavy traffic, and is backed by a secure and isolated CMS.

This project shows how a headless architecture can solve major performance and stability issues without changing how editorial teams work. The client keeps their familiar WordPress workflow, while the frontend becomes significantly faster, more reliable, and ready for the future.