WordPress Site Caching for improving TTFB

We are going to looking on optimizing WordPress site through caching plugin to improve TTFB.

What is TTFB?

Time to first byte (TTFB) is a metric for determining the responsiveness of a web server. It measures the amount of time between creating a connection to the server and downloading the contents of a web page. TTFB is impacted by these factors : 1) sending a request from a client machine to the server, 2) processing that request on the server and generating a response, and 3) sending the response from the server to the client.

Sample TTFB for a demo site https://wordpress2.marslert.com/. cPanel environment with

Apache Event mode

Test Run A

Test Run B

Other cache plugin like WP Rocket (paid), W3 total cache, WP Super Cache, Cache Enabler, etc are popular as well. Catch them at here. Also, we can use cache application like memcache, varnish, etc. At the end of the post, I will demonstrate the result of varnish cache.

I will demonstrate the after caching effect through W3 total cache.

Test Run A

Test Run B

TTFB speed is improved with the deployment of cache plugin.

Sample TTFB for a demo site https://wordpress1.marslert.com/. Plesk environment with

Apache Event Mode

Test Run A without nginx cache and w3 total cache.Test Run B without nginx cache and w3 total cache.

Turning on nginx proxy mode from Plesk Apache & nginx Settings.

Test Run A with nginx cache.Test Run B with nginx cache.

What if trying it Varnish caching? I loaded Varnish engine under docker on the Plesk server.

HTTP header that show varnish.

Test Run A with varnish cache proxy.Test Run B with varnish cache proxy.

Varnish is a great caching tool which not just caching the content, reduce bandwidth and also can defense DDOS attack. Read https://varnish-cache.org/intro/ for more information.It can further optimizing website loading speed, TTFB, etc.

Stay tune for remote varnish caching server post that serve different content websites from multiple origin server ( web server ). Cheers.

Leave a Reply

Your email address will not be published. Required fields are marked *