Fastly two major services – CDN and whole site caching including acceleration. They have developed a unique offsite caching plugin for WordPress. Their caching and acceleration are dependent on Varnish. Instead of using installing and configuring Varnish on your server, you can test their service.
Fastly has impressive performance including the ability to purge everything in the cache. They help the caching of “event-driven” content. So, when we publish a new article or disable/enable a plugin, it is not mandatory to manually purge.
Can We Use Fastly Plugin for Caching WordPress with Changes in DNS?
Yes. You can still use another high-performing origin-pull CDN (like CacheFly) on your setup with some WordPress plugin such as CDN Linker Lite. However, you should not use WP Super Cache, W3 Total Cache or WP Rocket with this plugin. Using WP Super Cache will not fail anything but for nothing, the cache plugin will suck your server resource. Double caching may harm performance.
---
You can test without a change of any DNS record, although Fastly recommends performing the steps to add a CNAME. But for WordPress, when you are using the plugin, the parts of the website are pulled from their PoPs. This is what happens when we use Memcached, but it is happening on a global scale. As you are not using their standard recommended setup, your TTFB will not improve. So compress the page using old-school .htaccess
rules. The acceleration will happen after the initial loading. For testing purposes, it is a safe method and will keep the DNS under your control. But, Fastly’s dashboard will fail to reflect any hits on their statistics widgets.
It is great to test with their $50 credit. But sadly it is probably not usable for production. There are many fine prints apart from high pricing, such as:
“No more than 10% of traffic may originate in the African, Indian, or South Korean billing regions.”
Just for using Varnish at a global scale, probably you are not willing to pay $50 or more per month.
How to Use Fastly Plugin for Caching WordPress?
Visit fastly.com
and create a service for your website. It is very easy, hardly you need to read a few lines of their documentation. Then install the Fastly WordPress plugin:
1 | https://wordpress.org/plugins/fastly/ |
Please read this part carefully:
To get the most value out of Fastly we recommend you upload VCL snippets from https://github.com/fastly/WordPress-Plugin/tree/master/vcl_snippets. These snippets will add code for following
– Force certain paths to be passed (not cached) e.g. wp-admin, wp-login.php
– Makes sure that logged-in user sessions are never cached
– Handling for serving stale on error
You can upload them by hand or press the Update VCL button in the UI.
It is easy to fill up the required data. Press to update the custom VCL rules. Test your site on www.webpagetest.org
after some minutes.
You can test with many alterations, such as adding the CNAME as recommended, enabling/disabling the WP Super Cache plugin etc.