Astro vs WordPress: A Performance Comparison After Migrating My Blog
Recently, I migrated my blog from WordPress to Astro, looking for improvements in developer experience, content workflow, and performance. While my primary motivations werenât purely performance-related (as detailed in my previous post), I was certainly curious how the two platforms would compare.
This post focuses exclusively on the performance comparison between my WordPress site and the new Astro version. Using Lighthouse and real-world metrics, Iâll analyze the performance differences, share unexpected findings, and what we can learn from them.
Performance comparison script
You can find the nodejs script I created to run this performance comparison github.com/mfyz/mfyzcom_lighthouse_benchmark.
- Runs Lighthouse performance benchmarks on matching pages across two websites
- Compares key metrics: Performance, Accessibility, Best Practices, SEO
- Measures Web Vitals: LCP, FID, TTFB - Additionally analyzes resource sizes: HTML, JS, CSS
- Exports results to CSV for analysis
Script is not limited to WordPress and Astro. There are two domains and list of urls defined in the script, but these two domains can be really anything.
đĄ A common use case for this script could be, using preview deployment URLs of any site to compare its performance changes before you push them live. Especially handy if you are using Vercel or Netlify for deployments.
Letâs get to the comparison: WordPress vs. Astro
Before pushing the new site live, I ran comprehensive performance tests comparing the WordPress site with the Astro version.
Key Performance Findings
After running comprehensive Lighthouse tests on both the WordPress and Astro versions of the site, here are the actual performance results:
Overall Average Scores
Metric | WordPress | Astro | Difference |
---|---|---|---|
Performance Score | 99.1 | 99.5 | +0.4 points |
Accessibility | 99.0 | 97.7 | -1.3 points |
Best Practices | 99.3 | 100.0 | +0.7 points |
SEO | 86.0 | 100.0 | +14.0 points |
Largest Contentful Paint (LCP) | 0.81s | 0.44s | -0.37s (faster) |
First Input Delay (FID) | 16ms | 16ms | No change |
Time To First Byte (TTFB) | 83.1ms | 68.3ms | -14.8ms (faster) |
HTML Size | 38.9KB | 10.9KB | -28.0KB (đ» 72.0%) đ |
JavaScript Size | 13.4KB | 5.3KB | -8.1KB (đ» 60.4%) đ |
CSS Size | 67.2KB | 6.6KB | -60.6KB (đ» 90.2%) đ |
20kb average total download size for my majority of my blog. Any why it should be more than that? Iâm simply writing. All I want is clean, simple layout, typography and some rich elements when I really need it. Anything above this is just bloat.
Now it feels more like 1999 again đ
Performance Analysis
The results revealed some interesting insights. Both sites performed exceptionally well in core performance metrics, with both versions achieving excellent scores in the Lighthouse performance category. Letâs break down what these numbers mean:
-
Performance: Astro scored slightly better with 99.5 vs WordPressâs 99.1. Both scores are in the âGoodâ range (90-100), indicating excellent performance. The small difference shows that static site generators can have a slight edge over even well-optimized CMS platforms.
-
Accessibility: WordPress scored slightly higher with 99.0 vs Astroâs 97.7. The gap has significantly narrowed after recent accessibility improvements to the Astro implementation. Both are now in the âGoodâ range, with only a 1.3 point difference.
-
Best Practices: Astro slightly outperformed WordPress with a perfect 100.0 vs WordPressâs 99.3. Both are in the âGoodâ range, but Astro demonstrates slightly better adherence to web best practices.
-
SEO: Astro significantly outperformed WordPress with a perfect 100 score compared to WordPressâs 86.0. This is one of the clearest advantages of the Astro implementation and represents a substantial improvement.
-
Core Web Vitals and Speed Metrics: Both sites performed exceptionally well in these critical metrics, but with some notable differences:
- LCP (Largest Contentful Paint): Astro averaged 0.44s compared to WordPressâs 0.81s, a 46% improvement and well under the 2.5s âGoodâ threshold
- FID (First Input Delay): Both at 16ms, well under the 100ms âGoodâ threshold
- TTFB (Time To First Byte): Astro was faster at 68.3ms vs WordPressâs 83.1ms, a 18% improvement
-
Resource Size: The most dramatic differences were in resource sizes:
- HTML: Astroâs HTML was 72.0% smaller (10.9KB vs 38.9KB)
- JavaScript: Astro used 60.4% less JavaScript (5.3KB vs 13.4KB)
- CSS: Astro used 90.2% less CSS (6.6KB vs 67.2KB)
Page-by-Page Performance
Hereâs a detailed breakdown of performance scores for each tested page:
Page | WP Performance | Astro Performance | WP Accessibility | Astro Accessibility | WP LCP (s) | Astro LCP (s) |
---|---|---|---|---|---|---|
Homepage | 98.0 | 100.0 | 100.0 | 98.0 | 0.90 | 0.32 |
n8n workflows | 99.0 | 100.0 | 98.0 | 100.0 | 0.84 | 0.26 |
XMLHTTPRequest | 98.0 | 100.0 | 100.0 | 100.0 | 0.86 | 0.32 |
n8n form trigger | 99.0 | 100.0 | 96.0 | 95.0 | 0.82 | 0.26 |
Fastify + Vercel | 98.0 | 100.0 | 100.0 | 97.0 | 1.05 | 0.50 |
Automate with n8n | 100.0 | 100.0 | 98.0 | 97.0 | 0.82 | 0.27 |
Scale at Arc XP | 99.0 | 100.0 | 100.0 | 100.0 | 0.83 | 0.48 |
turso + drizzle | 100.0 | 97.0 | 100.0 | 97.0 | 0.78 | 1.09 |
kokorojs | 99.0 | 98.0 | 99.0 | 95.0 | 0.89 | 0.89 |
About | 100.0 | 100.0 | 98.0 | 96.0 | 0.53 | 0.26 |
License | 100.0 | 100.0 | 100.0 | 100.0 | 0.61 | 0.23 |
Performance by Content Type
Interestingly, certain content types showed specific patterns:
- Simple pages (About, License): The Astro version had faster LCP times (0.28s vs 0.40s for About; 0.26s vs 0.36s for License)
- Code-heavy blog posts: Astro generally outperformed WordPress (0.34s vs 0.74s for XMLHTTPRequest post)
- Image-heavy posts: Most posts performed better in Astro, but some posts like the turso+drizzle post (1.10s vs 0.90s LCP) and kokorojs post (0.90s vs 0.88s LCP) performed slightly better in WordPress
What These Results Mean
The performance results provide a nuanced view of how static site generators compare to well-optimized WordPress sites. Some key insights:
This was a Highly Optimized WordPress
Itâs worth emphasizing that my WordPress site was heavily statically cached at multiple levels:
- WP Rocket: Server-side caching plugin generating static HTML files
- Cloudflare Edge Caching: 1-week TTL at the CDN level
This means that during these tests, no actual PHP rendering was happening on the WordPress site. Weâre definitely looking at a highly optimized WordPress installation in this benchmark, which explains why the Lighthouse performance scores are identical in many cases.
-
WordPress can still be fast with proper optimization: My WordPress site was already highly optimized with a lightweight theme, minimal plugins, and good hosting. The identical performance scores (99.5 for both) demonstrate this clearly.
-
Content type matters: Simple pages and most content types showed consistent improvements in Astro, with a few exceptions for certain image-heavy posts.
-
SEO improvements are significant: The perfect 100 SEO scores across all Astro pages represent a meaningful improvement from WordPressâs 86.0 average.
-
Resource efficiency is dramatically better in Astro: The most striking differences were in resource sizes, with Astro using 72.0% less HTML, 60.4% less JavaScript, and 90.2% less CSS.
Technical Implementation Notes
For those interested in the technical aspects of the Astro implementation:
- Built with: Astro, MDX for content, TailwindCSS for styling
- Hosting: Vercel with static site generation
- Components: Mix of Astro and React components
- Images: Optimized with Astroâs built-in image optimization
- Performance features: Route pre-fetching, deferred hydration, CSS optimization
Conclusion
Migrating from WordPress to Astro has transformed my content workflow and delivered notable performance improvements, particularly in resource efficiency and loading speed. My WordPress site was already extremely well-optimized, which explains why both implementations achieved identical Lighthouse performance scores (99.5).
The key findings from this migration:
- Performance isnât just about the framework: A well-optimized WordPress site can nearly match a static site in core Lighthouse performance metrics
- LCP improvements are significant: Astro delivered a 46% faster Largest Contentful Paint on average (0.44s vs 0.81s)
- Resource efficiency is dramatically better: Astro used 72.0% less HTML, 60.4% less JavaScript, and 90.2% less CSS
- SEO improvements: The most significant advantage was in SEO scores, where Astro consistently achieved perfect scores compared to WordPressâs 86.0 average
- Content-dependent results: Nearly all page types showed LCP improvements in Astro, with only a couple of image-heavy exceptions
Let me know if youâre considering a similar migrationâIâm happy to share more specific insights about the process!
If you want to conduct a similar performance comparison between two sites, you can use the performance comparison script I created: github.com/mfyz/mfyzcom_lighthouse_benchmark.