In this KB:
- Various frequently asked questions related to Varnish are answered
Which applications work with Varnish?
Here you have a list of the applications available in our platform that support varnish:
- Multisite WordPress
Which applications do not have Varnish support?
Here you have a list of the applications available in our platform that don’t support Varnish:
- Custom PHP
What Do I Need to Do to Get Varnish Working With My Application?
- First, you need to ensure that Varnish is enabled. You can verify this from your Cloudways console as shown in the image above.
- Check if your application supports Varnish or not. If it does, then you need to configure the application-specific plugin correctly as it provides Varnish integration. Here you have the plugins list (plugins are installed automatically with Cloudways base application deployments):
WordPress / Woocommerce: W3 Total Cache
Magento: PageCache by Phoenix
Mediawiki: Native support (you need to define Varnish settings in LocalSettings file)
Joomla: Third party plugin (Contact Cloudways Support)
Drupal: Varnish Extension
- Check if your application version and installed plugin are compatible with Varnish (plugins like WooCommerce for WordPress and Varnish >= 1.8 are not totally compatible with Varnish, contact support for further guidance).
Why Do I See a Low Number of Hits in Varnish?
You can control the percentage of requests that hit your cache from the Monitoring tab as seen above. The higher the percentage of hits, the faster your site is going to be. Although there may be some reasons which keep the number of hits low or zero:
- Either you do not have a supported Varnish plugin installed, or you have not configured it correctly.
- Cache entries expire after 4h of being cached. If you have a site with low traffic, this can mean entries being purged from the cache before they have a chance of being used and leads to a low number of cache hits.
- Type of content and how it is served (i.e. example POST requests or requests that require session handling).
- Sites that update their content very frequently also sees a lower cache hit rates as entries are purged from the cache when updated.
After Doing Changes to My Site, I Cannot See Them on My Browser? Does It Relate to Varnish?
On the Cloudways console (as seen above), to be able to view your changes:
- You also have the option to purge the cache from admin panel for applications like WordPress, Drupal and Magento (However most plugins clears the cache automatically when you update application content).
- Varnish can be disabled anytime from Cloudways console as shown in the image above.
Note: Disabling Varnish this way also disables it for all applications installed on the server.
Can I Disable Varnish for a Particular Application on my Server?
- Yes, this feature is available in Cloudways console through the application management section of the application you wish to disable it on. Simply go to “Application Settings” and change Varnish status.
Can I bypass Specific Pages / URLs from Varnish?
- You can con control the caching of specific pages and Url’s through Varnish settings options. To learn more click here.
- You can Include or Exclude Cookies from your varnish from by following this link.
Can I Modify Varnish VCLs?
- You can not modify the main varnish VCL’s, however, you can use the Varnish settings to exclude or include Url’s and Cookies.
Why does Varnish Not Work With My Magento 1.8 and Higher?
- Varnish integrates with Magento through our recommended plugin (Phoenix Media’s PageCache powered by Varnish). This free plugin is compatible with Magento versions from Magento 1.7 up to 1.8 or higher. Magento introduced a unique session ID feature that breaks PageCache functionality. Please contact support for alternatives.
Why Does Varnish Not Work With Moodle?
- At this stage, there are no plugins offering Varnish integration for Moodle.