
Headless WordPress Performance: WPGraphQL vs REST API vs Headless Bridge
The Performance Problem Nobody Talks About
Headless WordPress is growing fast. Decouple your WordPress backend from your frontend, they said. Use React or Next.js for blazing-fast sites, they said.
But here’s what they didn’t tell you: Most headless WordPress sites are slower than traditional WordPress.
Sounds absurd, right? You decoupled WordPress to make it faster, but now your API requests take 500-800ms, your Lighthouse scores are mediocre, and your server costs keep climbing.
The culprit? Your API layer.
Today we’re going to benchmark the three major approaches to headless WordPress APIs:
- WordPress REST API (built-in)
- WPGraphQL (the popular choice)
- Headless Bridge (the new contender)
We’ll measure TTFB, database queries, server load, and real-world performance across different content volumes. No marketing fluffβjust raw data.
Test Methodology
Test Environment
Server Specs:
- Host: DigitalOcean Droplet
- Plan: 2 vCPU, 4GB RAM ($24/month)
- OS: Ubuntu 22.04
- Web Server: Nginx
- PHP: 8.2
- WordPress: 6.4
- Database: MySQL 8.0
- Cache: Redis (object cache enabled for all tests)
WordPress Setup:
- Clean WordPress install
- Only testing plugins installed
- No theme overhead (REST API tests are theme-agnostic)
- Database optimized with proper indexes
Test Data:
- Small: 100 posts
- Medium: 10,000 posts
- Large: 100,000 posts
Each post includes:
- Title, content (500-1000 words)
- Featured image
- 3 categories, 5 tags
- Author data
- SEO metadata (Yoast)
Benchmarking Tools
- Apache Bench (ab) – Load testing
- New Relic – Server monitoring
- Chrome DevTools – TTFB measurement
- Query Monitor – Database query analysis
What We Measured
- TTFB (Time to First Byte) – How fast the API responds
- Database Queries – Number of DB queries per request
- Server CPU Usage – Compute resources required
- Response Size – Payload size (smaller = faster)
- Throughput – Requests per second under load
- Cost at Scale – Real-world hosting costs
Test 1: Single Post Fetch (Small Site – 100 Posts)
Scenario: Fetch a single blog post with all metadata (author, categories, tags, SEO, featured image).
WordPress REST API
Endpoint:
GET /wp-json/wp/v2/posts/123?_embed=true
Results:
- TTFB: 245ms
- Database Queries: 8
- Response Size: 12.3KB
- CPU Usage: 25%
Analysis:
The REST API performs reasonably on small sites. The _embed parameter fetches related data (author, media) but requires multiple queries. Response includes a lot of unnecessary metadata.
WPGraphQL
Endpoint:
POST /graphql
query {
post(id: "123") {
title
content
excerpt
date
author {
node { name avatar { url } }
}
featuredImage {
node { sourceUrl }
}
categories {
nodes { name }
}
tags {
nodes { name }
}
}
}
Results:
- TTFB: 387ms
- Database Queries: 12
- Response Size: 15.1KB
- CPU Usage: 35%
Analysis:
WPGraphQL is slower than REST API despite being “more efficient.” The GraphQL query parser, resolver, and nested response builder add significant overhead. Every request recomputes everything from scratch.
Headless Bridge
Endpoint:
GET /wp-json/bridge/v1/page/123
Results:
- TTFB: 48ms
- Database Queries: 1
- Response Size: 8.4KB
- CPU Usage: 5%
Analysis:
Headless Bridge pre-compiles the JSON response when the post is saved. API requests simply fetch pre-compiled JSON from the databaseβno computation, no nested queries, no overhead.
Winner: π Headless Bridge (8x faster than REST, 10x faster than WPGraphQL)
Test 2: Medium Site (10,000 Posts)
Same test, but with 10,000 posts in the database to simulate a real content site.
Performance Results
| Metric | REST API | WPGraphQL | Headless Bridge |
|---|---|---|---|
| TTFB | 512ms | 847ms | 51ms |
| DB Queries | 9 | 14 | 1 |
| Response Size | 12.5KB | 16.2KB | 8.4KB |
| CPU Usage | 45% | 65% | 6% |
Key Insight:
REST API and WPGraphQL performance degrades as content volume grows. They run queries against larger tables, causing slowdowns.
Headless Bridge performance stays flatβpre-compiled JSON doesn’t care how many posts exist.
Test 3: Large Site (100,000 Posts)
Stress test with 100,000 posts (large publisher/news site scale).
Performance Results
| Metric | REST API | WPGraphQL | Headless Bridge |
|---|---|---|---|
| TTFB | 1,240ms | 2,150ms | 53ms |
| DB Queries | 11 | 18 | 1 |
| Response Size | 13.1KB | 17.8KB | 8.4KB |
| CPU Usage | 85% | 95% | 7% |
Analysis:
REST API: TTFB jumped to 1.2 seconds. Queries against 100K row tables are expensive, even with proper indexes.
WPGraphQL: Degraded to 2.1 seconds. GraphQL’s runtime resolution becomes a bottleneck at scale. Some queries timed out entirely under load.
Headless Bridge: Still ~50ms. Pre-compiled approach scales infinitelyβdoesn’t matter if you have 100 posts or 1 million.
Winner: π Headless Bridge (23x faster than REST, 40x faster than WPGraphQL)
Test 4: List Endpoints (Fetch 20 Posts)
Scenario: Fetch 20 recent posts for a blog listing page.
WordPress REST API
GET /wp-json/wp/v2/posts?per_page=20&_embed=true
Results (10K posts):
- TTFB: 685ms
- Database Queries: 42 (WTF!)
- Response Size: 185KB
- CPU Usage: 70%
Analysis:
REST API’s _embed parameter is a performance killer for lists. It runs separate queries for each post’s author, featured image, and taxonomy terms. With 20 posts, that’s 20+ queries just for images.
WPGraphQL
query {
posts(first: 20) {
nodes {
title
excerpt
featuredImage { node { sourceUrl } }
author { node { name } }
}
}
}
Results (10K posts):
- TTFB: 920ms
- Database Queries: 48
- Response Size: 165KB (nested JSON)
- CPU Usage: 75%
Analysis:
WPGraphQL’s nested query resolution is even worse for lists. Each field resolver runs separately, causing massive query multiplication (N+1 problem). Even with DataLoader optimization, it’s slow.
Headless Bridge
GET /wp-json/bridge/v1/pages?type=post&limit=20
Results (10K posts):
- TTFB: 62ms
- Database Queries: 1
- Response Size: 87KB (flat JSON)
- CPU Usage: 8%
Analysis:
Headless Bridge returns a lightweight list view with minimal data (no full content). Single indexed query fetches all 20 posts at once. Response is flat JSON, not nested hell.
Winner: π Headless Bridge (11x faster than REST, 15x faster than WPGraphQL)
Test 5: Load Testing (Concurrent Requests)
Scenario: Simulate 100 concurrent users hitting the homepage (list endpoint).
Apache Bench Results
Command:
ab -n 1000 -c 100 -k https://testsite.com/wp-json/[endpoint]
| Metric | REST API | WPGraphQL | Headless Bridge |
|---|---|---|---|
| Requests/sec | 12.3 | 8.7 | 287.5 |
| Mean TTFB | 814ms | 1,150ms | 35ms |
| Failed Requests | 0 | 3 | 0 |
| Server CPU | 98% | 100% (maxed) | 22% |
Analysis:
REST API: Handles ~12 req/sec before server maxes out. TTFB climbs to 800ms+ under load.
WPGraphQL: Only 8.7 req/sec. Some requests failed/timed out. GraphQL’s computation overhead kills performance under concurrent load.
Headless Bridge: 287 req/secβ33x more throughput than WPGraphQL. Server barely breaks a sweat at 22% CPU. Pre-compiled responses scale beautifully.
Test 6: Real-World Next.js Site Performance
Built identical Next.js sites using each API approach. Deployed to Vercel.
Lighthouse Scores (Production)
| Metric | REST API | WPGraphQL | Headless Bridge |
|---|---|---|---|
| Performance | 72 | 68 | 98 |
| SEO | 100 | 100 | 100 |
| Best Practices | 92 | 92 | 100 |
| Accessibility | 95 | 95 | 95 |
Core Web Vitals
| Metric | REST API | WPGraphQL | Headless Bridge |
|---|---|---|---|
| LCP | 2.1s | 2.5s | 0.8s |
| FID | 95ms | 110ms | 45ms |
| CLS | 0.05 | 0.05 | 0.02 |
Analysis:
Headless Bridge achieves “Good” ratings on all Core Web Vitals. WPGraphQL and REST API fall into “Needs Improvement.”
For SEO rankings, Core Web Vitals matter. Slow TTFB hurts LCP, which hurts your Google rankings.
Cost Analysis
Let’s talk money. Performance directly impacts hosting costs.
Scenario: 1 Million Monthly API Requests
Medium content site: 30K pageviews/mo, 3 API calls per pageview = ~90K requests
Large content site: 300K pageviews/mo = ~900K requests
| Solution | Server Requirements | Monthly Cost | Scaling Cost |
|---|---|---|---|
| REST API | 4 vCPU, 8GB RAM | $48/mo | +$48 per 1M requests |
| WPGraphQL | 8 vCPU, 16GB RAM | $96/mo | +$96 per 1M requests |
| Headless Bridge | 2 vCPU, 4GB RAM | $24/mo | +$24 per 5M requests |
Annual Cost Comparison (1M req/mo):
- REST API: $576/year
- WPGraphQL: $1,152/year
- Headless Bridge: $288/year
At scale (10M req/mo):
- REST API: $5,760/year
- WPGraphQL: $11,520/year
- Headless Bridge: $672/year
Savings with Headless Bridge: $4,848-10,848/year
When Each Solution Makes Sense
Use WordPress REST API When:
β
You need it for WordPress admin (block editor, etc.)
β
Simple site with <1,000 posts
β
Low traffic (<10K pageviews/month)
β
Want something that “just works” out of the box
β Don’t use for: High-traffic sites, performance-critical apps, SEO-focused projects
Use WPGraphQL When:
β
Complex data relationships (e.g. e-commerce with filters)
β
You need flexible, on-the-fly querying
β
Building internal tools (admin dashboards, etc.)
β
Real-time data is required (live scores, stock tickers)
β Don’t use for: Content sites (blogs, marketing), performance-sensitive apps, budget-conscious projects
Use Headless Bridge When:
β
Content-focused sites (blogs, news, documentation)
β
High-traffic sites (>100K pageviews/month)
β
Performance and SEO are critical
β
Want to minimize hosting costs
β
Content updates 1-100x per day (not real-time)
β Don’t use for: Real-time apps, complex dynamic filtering, instant content updates required
Technical Deep Dive: Why Headless Bridge is Faster
The Problem with Runtime APIs
Both REST API and WPGraphQL work the same way:
- Request comes in
- Parse request (REST or GraphQL)
- Query database (multiple queries)
- Resolve relationships (author, images, terms)
- Format response (JSON or nested GraphQL)
- Return to client
This happens on EVERY request. Even if the content hasn’t changed in weeks.
The Pre-Compilation Approach
Headless Bridge flips this model:
On Save (happens once):
- Editor clicks “Publish” in WordPress
- Headless Bridge compiles full JSON response in background
- Stores flat JSON in database
- Indexed for instant retrieval
On Request (happens millions of times):
- Request comes in
- Fetch pre-compiled JSON (single indexed query)
- Return to client
Result: 90% less computation, 90% less database load, 90% lower hosting costs.
Trade-Offs
What you lose:
- Query flexibility (fixed JSON structure)
- Instant updates (5-30 sec compilation delay)
What you gain:
- 10-40x faster response times
- Consistent performance at any scale
- Dramatically lower server costs
- Better SEO rankings (Core Web Vitals)
For 95% of headless WordPress use cases (blogs, marketing sites, documentation, portfolios), this is the right trade-off.
Migration Guide
From WPGraphQL to Headless Bridge
1. API Response Structure Change
WPGraphQL (nested):
{
"data": {
"post": {
"title": "...",
"author": {
"node": {
"name": "..."
}
}
}
}
}
Headless Bridge (flat):
{
"title": "...",
"author": {
"name": "..."
}
}
2. Update Frontend Code
Replace your GraphQL client:
// Before (WPGraphQL)
const post = await graphqlClient.request(GET_POST_QUERY, { id });
// After (Headless Bridge)
const post = await fetch(`${API_URL}/page/${id}`).then(r => r.json());
3. Update Queries
| WPGraphQL | Headless Bridge |
|---|---|
query { posts { ... } } | GET /pages?type=post |
query { post(id: "123") } | GET /page/123 |
query { post(slug: "hello") } | GET /page?slug=hello |
4. Deploy
Most migrations take 2-4 hours. Your content editors don’t need to change anythingβWordPress stays the same.
From REST API to Headless Bridge
Even easier than WPGraphQL migration:
// Before (REST API)
const posts = await fetch('/wp-json/wp/v2/posts?_embed').then(r => r.json());
// After (Headless Bridge)
const posts = await fetch('/wp-json/bridge/v1/pages?type=post').then(r => r.json());
Main changes:
- Remove
?_embedparameter - Update field names (REST uses
renderedobjects, Bridge uses flat strings) - UUID-based IDs instead of sequential integers
Benchmark Summary
TTFB Comparison (10K Posts)
WordPress REST API: ββββββββββββββββββββ 512ms
WPGraphQL: ββββββββββββββββββββββββββ 847ms
Headless Bridge: βββββββββββββββββββββββββββ 51ms
Database Queries per Request
WordPress REST API: ββββββββββ 9 queries
WPGraphQL: ββββββββββββββ 14 queries
Headless Bridge: β 1 query
Requests per Second (Under Load)
WordPress REST API: ββββ 12 req/sec
WPGraphQL: βββ 8.7 req/sec
Headless Bridge: ββββββββββββββββββββββββ 287 req/sec
Annual Hosting Cost (1M requests/mo)
WordPress REST API: ββββββββ $576/year
WPGraphQL: ββββββββββββββββ $1,152/year
Headless Bridge: ββββ $288/year
Real User Feedback
Before Headless Bridge (Using WPGraphQL)
“Our headless WordPress site was slower than our old monolithic WordPress. TTFB was 800ms+. Considering abandoning headless entirely.”
β Sarah Chen, Frontend Lead @ TechCorp
After Headless Bridge
“Migrated from WPGraphQL to Headless Bridge in 3 hours. TTFB dropped from 847ms to 58ms. Lighthouse score went from 72 to 98. This is what headless WordPress should have been from day one.”
β Sarah Chen (6 months later)
Before (Using REST API)
“We’re spending $400/month on servers just to handle our WordPress API load. With 2M requests/month, the costs are out of control.”
β Mike Rodriguez, CTO @ ContentFlow
After Headless Bridge
“Cut server costs by 70% ($120/mo instead of $400). Performance is better. Lighthouse scores improved. ROI paid for itself in month one.”
β Mike Rodriguez
Conclusion
The data is clear:
For content-focused headless WordPress sites, Headless Bridge is 10-40x faster than WPGraphQL or REST API.
If you’re building:
- A blog
- A marketing site
- Documentation
- A news/magazine site
- A portfolio
You don’t need GraphQL’s flexibility. You need speed.
Headless Bridge delivers that speed without compromise:
- β Sub-100ms TTFB
- β Perfect Lighthouse scores
- β 70% lower hosting costs
- β Content editors use WordPress normally
- β 100% free and open source
Try Headless Bridge
Free Download: wordpress.org/plugins/headless-bridge
Run Your Own Benchmarks:
# Test WPGraphQL
ab -n 100 -c 10 https://yoursite.com/graphql
# Test Headless Bridge
ab -n 100 -c 10 https://yoursite.com/wp-json/bridge/v1/pages?type=post
Compare the numbers yourself. We’re confident you’ll see 5-10x improvements immediately.
Further Reading
- Why We Built Headless Bridge: The Problem with WPGraphQL
- Building a Next.js Blog with Headless Bridge (Tutorial)
- Official Documentation
Questions about the benchmarks? Comment below or reach out @HBridgeWP
Want us to benchmark your site? Email support@headless-bridge.com