- By orhunonurtaspinar
- October 18, 2023
- No Comments
Time to First Byte (TTFB) refers to the time between the browser requesting a page and when it receives the first byte of information from the server. This is important because lower TTFB should improve site speed and user experience.
When you click the websites and pages, the moment starts to render- CSS or preloaded content you choose.
Finally, the faster the TTFB, the better the website’s performance. This article will cover all of the aspects of TTFB and how to optimize it to help your speed.
Bullet Points:
- TTFB is a critical part of website optimization since the faster the TTFB, the faster the requested resource can start being delivered to the browser.
- The longer it takes to get that data, the longer it takes to display your page. In my opinion, optimizing TTFB is a fundamental metric for user experience.
- Typically, anything under 100 ms is great and good TTFB; you can check out Pagespeed Insight, Google Chrome DevTools, Pingdom, and GTmetrix. It’s the better way to check it out with Google Chrome Devtools.
- Too many plugins can slow your site, cause plugin conflicts and increase server response times. When you delete a WordPress plugin in the dashboard, you should remove all WordPress parts’ traces and track them in your Database.
- Shared hosting is a cheaper version of dedicated hosting. Don’t expect a fast TTFB.
- The search Cloudflare showed that HTTP/3 had a 12.4% faster average TTFB compared to HTTP/2.
That being said, a low TTFB generally means that a site feels faster and more responsive. Having a site that responds fast to clicks is very important for good user experience.
source – https://searchfacts.com/reduce-ttfb/
Google flags your TTFB if it’s over 600ms but they used to recommend just 200ms. You can aim for 600ms on shared hosting and 200ms on VPS/cloud. TTFB also depends on where you test it.
0-200ms | Google Recommended |
200-600ms | Passes Lighthouse |
600-1000ms | Fails Lighthouse |
1000ms+ | Very Slow |
On average, anything with a TTFB under 100 ms is great. Anything between 200-500 ms is standard, between 500 ms – 1 s is less than ideal, and you should likely investigate anything greater than 1000ms further.
TTFB start with an HTTP request, DNS lookup, and establishing the connection using a TCP handshake and SSL handshake if the request is made over HTTPS. (source) A slow DNS causes latency which is part of TTFB (and TTFB is part of LCP)
The problem is that too many HTTP requests also slow down page speed and service response time—an average of 80 HTTP requests, but keeping under 50 per page requests is a healthy performance.
You can check your HTTP request here: HTTP Request Checker
How Can I Know MY Website Time To First Byte(TTFB)?
You can manually check your TTFB with Google Chrome DevTools.
There are good tools available.
It would help if you check your websites here: https://tools.keycdn.com/performance
And as well as bytecheck
Here: http://www.bytecheck.com/
After you check, you can decide on the performance and make action about it.
How Can I Make A LOWER My TTFB Level?
- Delete Unnecessary Plugins: Slowing loading times down due to database bloat. Also, some plugins, such as SSL, might increase the TTFB timing because of redirecting. All In One SEO is the plugin that slowing-down your WP because of memory impacts. Other plugins such as Analytify, AnyWhere Elementor, Akismet, Backup Buddy, and Elementor can negatively impact your page speeds and memory problems.
- Disk Usage: disk usage, disk speed, RAM capacity, and database speed are important factors.
- Upgrade PHP v8.0 (or the latest version): PHP/ASP settings are important for solving bugs and better databases.
- Decrease the distance of your server: Yet, it’s a common but important step to choose a high-quality server and hosting provider. Using a faster host, you can see a 20% decrease (or more) in TTFB globally and a 32% decrease in TTFB across the United States and Canada. It is not hard to get under 200 – 300 ms if your visitors are close to your server.
Content Delivery Network: Increase cache length (TTL)
For a better, faster, and more effective way to improve time to the first byte, you can configure the setting with setting” Configuration” tab. Set your “Browser Cache TTL” to something higher.
A great way to reduce the “Reduce initial server response time” warning from showing frequently is to increase your site’s cache expiration time (TTL). Longer cache times lead to improved site performance and better cache HIT ratios. It can also fix the warning from Google to “serve static assets with an efficient cache policy.”
It can also fix the warning from Google to “serve static assets with an efficient cache policy.”
Caching Everything
Cloudflare is good for caching resources like images and stylesheets (CSS); however, there are also rules available “cache-everything” with free-plan.
Yet, I don’t recommend it because it causes problems, even worsening page speeds because of extra requests and cookies. For that, the premium user has some of the features for this.
- Cloudflare will cache that and show subsequent visitors the logged-in version with the admin bar
- Cloudflare has an option to bypass the cache with a cookie, but it’s cost
“One of the biggest problems with Cloudflare’s Cache Everything is that logged in users couldn’t see the admin version of the page, but also there was a danger that the admin version would be accidentally cached and shown to everyone!”
Bhagwad Park – https://www.namehero.com/startup/how-to-reduce-your-ttfb-to-0-5-seconds/
To solve that problem, you can use a better opportunity and free version with easy to navigate plugin WP Cloudflare Super Page Cache.
This plugin not only caches your pages it also clears the specific URL cache on events such as a post updating.
WordPress Cleanup After Uninstalling Plugins
When you delete a WordPress plugin, you should remove all Traces of a WordPress Plugin in your Database.
How Can You Uninstalling The Plugins:
- First: You can also uninstall plugins with FTP. Connect to an FTP client such as FileZilla. Go to the /wp-content/ folder
- Second: Find the plugin you want to remove and delete it from your server by removing its folder.
You can delete plugin-associated files manually by yourself phpMyAdmin, or you can also use plugins such as “Plugins Garbage Collector” and “WP-Optimize.”
“Many WP plugins create their own tables and add this information to your Database. Some or all these tables are often left behind when you uninstall a plugin and are referred to as orphaned.”
WordPress Rocket Pluging For Optimizing Loading Time and To Speed Up TTFB
Normally, I’m fairly skeptical about over-marketing plugins such as WP-Rocket. However, when it comes to “Time To First Byte.” , WP-Rocket is working.
Reduce CPU
Reducing CPU frees up server resources and can improve TTFB. It also helps avoid CPU overages (a common hosting issue) which can prevent forced upgrades and save you money.
Some methods I already covered in this guide: heartbeat, post revisions, autosave interval, Cloudflare bot fight mode to block bad bots, offloading resources to CDNs, avoiding bloated themes/plugins, disabling unused plugin features, and not using cheap shared hosting.
Here are a few extra tips:
- Increase memory limit – increase the memory limit to at least 256B (if not more).
- Disable plugin usage sharing – it’s very small, but I never share my plugin data.
- Tweak server settings – WP Johnny has instructions in his speed guide (section #8).
- Control cron jobs – control cron jobs and replace WordPress cron with a real cron job.
- Disable trackbacks/pingbacks – can be done manually or using plugins like Perfmatters.
- Use AWstats – most hosts have AWstats which pinpoints where CPU is being consumed.
- Protect login page – login pages are common targets for bots. Limit login attempts, add a Cloudflare page rule to set the security level to high and move your login page to block them.
Note: Depending on the configuration and setting, Cloudflare can often increase your TTFB as it has security options, firewalls, and other technologies that help protect you from Hotlinks, Bots, and DDoS attacks. However, depending on your page-speed goal and optimization, you can use different settings.