I got trouble with the TTFB on my WordPress. It's always very slow on the first time loading on the browser and after many reload, TTFB still more than 600ms. This is some information:
- My website: https://passioshop.com/
- Using Contabo.com VPS: 6 vCPU Cores, 16 GB RAM, 400 GB SSD
- Using Cloudflare:
- Cache level: Standard
- Cache TTL: Max time
- Activate: auto minify, Brotli, Always Online, HTTP/3 (with QUIC), 0-RTT...
- Not using Rocket Loader
- Optimize Wordpress:
- Using WP-Optimize: Compress images, page caching, not using Minify and Combined because I want to render page as fast as possible.
- Using Asset CleanUp: Disable all unused script and CSS especially WooCommerce, Elementor. Disable Emojis, oEmbed, Dashicons, Gutenberg, XML-RPC...
- Optimize WHM: https://www.pakistanwebserver.com/hosting-tutorial/optimize-wordpress-better-performance-cpanel-hosting/
- Update and optimize mySQL: using MariaDB, 256MB Query Caching...
But the result only affected in TTLB not TTFB:
- Using this command: curl -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" https://passioshop.com .
I noticed that, The TTFB:
- When using HTTP: 0.016s
- At first time, using HTTPS: 2.799s
- The next time, using HTTPS: 0.209s
- In the Inspect of browser:
This is the first time loading on the browser:
And the next time, especially load plain text like https://passioshop.com/test.html, it's still above 500ms:
I nearly got 100 point in Google PageSpeed Insights:
Someone please help me to solve this. Any tips or how to find the reason may help me a lot! Thanks for any help.
The fact that static files are rendered within the same ~500ms implies that the problem is not with WordPress at all. I'd suggest try to do the following things:
Things that won't affect the speed in your case: