Reduce initial server response time

Server response time (also known as Time To First Byte) measures how long it takes the first byte of HTML to get from your server to your visitor’s browser. 

The faster the server responds, the faster the visitor will start seeing your page load.

PageSpeed shows this recommendation if the response time is more than 600ms.

How WP Rocket can help

Caching

Page caching greatly reduces the server response time by serving fast HTML pages, instead of slow, PHP-generated pages. 

Advanced tip:

Serving the cache file via our rewrite rules in the htaccess file is the most optimal method. In many cases the difference will not be noticeable, but it can help in situations where there may be server issues. 

Deactivating the Separate cache files for mobile devices option (found on the Cache tab) will do the trick in most cases. 

If your site is running on a standalone NGINX server, without an htaccess file, you can implement this configuration to achieve the same result: https://github.com/SatelliteWP/rocket-nginx

Database optimization

A bloated database can affect TTFB. Try using our database optimization feature to reduce the size of your database, and running regular cleanups.

You’ll find this feature under Dashboard > WP Rocket > Settings > Database

GZIP compression

WP Rocket applies this  automatically when a site runs on Apache/LiteSpeed. Compression reduces the filesize of the HTML making it faster to download. More info

Caching is working but I still see the recommendation

This means there are additional factors, outside of WP Rocket’s control, that are  affecting the server response time. 

Hosting / server resources

Your site can only be as fast as your hosting allows. 

If you are using a shared/cheap host, it means that your site is sharing resources with others on the same server. This affects how fast your site can run, even with caching. 

If you are seeing a server response time that varies a lot from test to test, or is consistently high, even when caching is active, this can indicate underlying issues with the server.

Upgrading your hosting package, or if you’re on a VPS, allocating more resources, will help.

PHP

Use the latest version of PHP available to you. 

If you are still on PHP 5.6, moving to 7+ is a must.

Geography

The distance between your server and your visitors will impact the server response time, and time to first byte. 

If your site is targeted to a specific geographic region, find a host that can host your site on a server close to your target audience.

Cloudflare Cache Everything

If you are a Cloudflare user, activating their Cache Everything feature will help by caching the HTML itself on their CDN, thereby improving the initial response time. 

Make sure to activate the Cloudflare Add-On in WP Rocket for full compatibility.

Code bottlenecks

Plugins, or other code on your site that is running slowly or generating errors can tie up your server’s resources so that it won’t be able to respond as quickly. 

Use a plugin like Query Monitor, or if it’s available to you, a service like New Relic, to see if there are any code issues on your site.

LazyLoad for CSS background images feature

Having the LazyLoad for CSS background images option enabled can cause a high server response time on pages that are not cached yet since this feature has to process all the CSS in your pages. This shouldn't affect pages that are already cached.

Additional resources

Not a WP Rocket customer yet?
Read our article about How to Reduce Time to First Byte and learn how to address this PageSpeed Insights recommendation with and without a plugin.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.