7 Tips to Reduce Server Response Times (TTFB) in WordPress
Today’s world is nothing if not a paced-paced one. We’ve become quick at everything, from eating to walking, as if we’re trying to grab as much of life as possible. Online, things are even more pronouncedly fast. If an ISP doesn’t provide fast enough connections, it loses customers. If a website isn’t quick enough to load, it loses visitors. Retention plummets, bounce rate skyrockets, and ultimately the business suffers. Naturally, we want to do everything we can to speed up our websites, but there’s one aspect that’s not so frequently discussed, and it concerns ways to reduce server response times (TTFB).
What is Server Response Time (TTFB)?
Server response time is a measurement that is often also referred to as TTFB. The abbreviation stands for “time to first byte” and it measures the time it takes for the server to respond after a HTTP request has been sent to it. The shorter this time is, the faster the server responds and the client browser is served faster. Needless to say, every website aims to have as short a TTFB as possible.
Here’s how it works:
First, the client browser makes a HTTP request to the server. The request may vary on several factors, such as the client’s connection, of course, but it also may include a DNS lookup.
Next, the server receives the request and starts processing it. This usually involves running scripts, communicating with databases and with network systems.
Finally, the server sends the response. The very first byte of that response is recorded and measured.
These three phases together make up the TTFB score. Ideally, it should be 100ms or lower, but anything between 200ms and 500ms is also okay.
Obviously, big websites with tons of pages loaded with multimedia will have a slower TTFB and their overall user experience will suffer. Let’s see how you can tackle this issue and reduce server response times (TTFB) in WordPress:
Before you start fixing the loading speed problem, you should first establish just how serious the problem is. Perhaps your website needs just a bit of improvement, perhaps it needs a lot, and perhaps it’s doing just fine when it comes to speed.
Either way, there are tons of excellent speed testing tools available, and if you’re using Chrome, one of them is right there in your browser. Click on the three dots in the upper right corner of the browser and then on More Tools. Select Developer tools. Next, click on Network in the interface menu, select the item you want to check TTFB for and click on Waterfall.
Depending on your browser version, the metric will be marked as “Waiting (TTFB)” or, in our case “Waiting for server response.” And that’s your TTFB right there.
However, this method of testing is a bit limited in terms of accuracy as the results depend on latency, connection and several other factors. The results you get within your browser may not be the same as your users get with their own browsers and their own internet connections, which is why you may want to try one of the speed testing services available online.
This time around, we opted for Pingdom Tools, a performance testing tool that allows you to pick a location you want to check the speed for.
Simply enter your website’s URL, pick a location from the dropdown menu and click on Start Test.
Once you get the results, scroll down to File Requests. Hover over the colored line next to the page you want to check and you’ll see your TTFB right there, except it will be called “Wait.”
Note that a lot of testing tools use this term “Wait,” “Waiting” or “Waiting time,” all referring to the, well, the time it passes before the server sends the first byte of response. In most cases, that will be your TTFB right there.
Now that we’ve seen how to obtain the metrics, let’s see how you can reduce server response times (TTFB) in WordPress.
Caching is one of those words that seem to go around a lot but not that many people understand what it really means. In short, caching means storing data in a special database so that the requested content can be served faster. Some web pages are media-heavy and are generally slow to load because, when a browser makes a request, the server needs to retrieve them all and serve them so that the page can be displayed properly. However, if some of the heavier files are stored in a special location and retrieved from there, the entire process is much faster. The files that can be stored – cached – that way are usually the static ones, that don’t change frequently.
Now, caching is something that may already be included in your hosting package. If it isn’t, you may want to use a plugin. Because it’s such a popular service, it’s no wonder there are so many caching plugins out there. Just do a bit of research and pick the one that seems right for your needs.
We’ve already written extensively about CDN and its benefits so if you’re unfamiliar with the concept we suggest you check out our piece on what CDN is and why you should use it. In short, CDN stands for Content Delivery Network and it’s a rather simple concept: it’s a network of servers distributed strategically around the world, so the content can be served to the user from the nearest server, thus significantly reducing the loading times and TTFB.
If you’re unsure which CDN service to pick, we got you covered in that department too, with our list of the best CDN services for WordPress.
When it comes to choosing the hosting provider, there are a lot of dilemmas a beginner web admin or website owner could face. For instance, should you opt for free hosting? Is it better to host your website on a Windows or a Linux server? Which is better – shared or managed hosting? We have covered a lot of these dilemmas in our guide to choosing a hosting provider, where we also talked about speed and performance.
One of the common reasons for slow server response times is shared hosting. In this type of hosting, several websites use one server – they share it. Obviously, this means slower loading times and a problematic TTFB for each of those websites. So if you made sure to optimize your site for speed and have eliminated all the other causes but your website is still slow, it may be a sign you need to move on from shared to dedicated or managed hosting.
If you expect heavy traffic or if your website has grown and now has more visitors than it used to, you may want to upgrade your hosting plan to one that offers better loading speeds and faster servers. Talk to your hosting provider and see what they can offer.
DNS stands for Domain Name System and it represents a sort of phonebook or yellow pages for the computers connected through the World Wide Web. When a server receives a request from the browser, it goes through the DNS, among other things, to collect necessary information. This process is sometimes one of the reasons for slow server response times. Now, many websites use a free DNS service, thinking it should be enough to do the job. While it certainly is enough for the job, it can affect the TTFB metric. If you feel that DNS may be affecting your site speed, you may want to consider changing it, perhaps switching to a premium one. With premium DNS providers, the information is usually fetched from the nearest server. Some of the good premium DNS providers include Cloudflare DNS, Amazon Route 53 or GoDaddy Premium DNS.
A website database is a storage that contains all of your website’s data – content files, theme and plugin information and a series of various options and settings. After a website has been in use for a while, especially if it’s a dynamic website with a lot of new content, the database may become seriously bloated, and this may affect the server response times. Optimizing your database, i.e. removing the unnecessary files from the storage, may reduce the bloat and help achieve better TTFB numbers. You can optimize your database manually, or with the help of a plugin – we have covered both methods in our extensive guide to optimizing your WordPress database so make sure to check it out.
Another thing that can happen with a WordPress website after it has been around for a while, in addition to database bloat, is a lot of plugins installed and seldomly used. Sometimes we may need a plugin to perform a certain function, and then forget about it. The plugin sits there, unused, and slows down the website, affecting the server response times. Not just that – unused plugins can clash and conflict with each other, affecting the overall website performance and causing malfunctions to the plugins themselves.
Best practices always involve performing regular maintenance of your website and deleting unused plugins is always a part of those efforts. Simply go through the plugins in your backend, see what you really need and what you can do without, and uninstall whatever you no longer use. While you’re at it, make sure all the remaining plugins are up to date, and update those that are not.
Wrapping It Up
We saw today that TTFB or server response time is an important metric that can seriously affect your website’s performance, its UX, its traffic and its conversion rate. Fortunately, fixing slow server response times is not something that requires particularly advanced knowledge or great efforts. With the set of tips we provided you with today, we are absolutely certain you can achieve faster TTFB and enjoy an overall better performance of your WordPress website. Let us know how it worked out!