Last updated: · By Asael Dreyer
Short answer: Varnish is a server-level cache layer that is installed and active out of the box on every Cloudways server. It serves visitors a ready-made copy of the page without running WordPress, so the site is faster and the server is less loaded. You turn it on or off in the server’s Manage Services, exclude URLs and cookies in the Varnish tab of the application settings, and change the cache lifetime (TTL) in Settings & Packages.
⏱ Time: 2–10 minutes per setting · Difficulty: easy to medium · Last checked against the official documentation: 6 Nov 2026
What Varnish is, and why it matters for your site
Before you touch any settings, here is what Varnish actually does.
Varnish Cache is an open-source HTTP accelerator that sits between the visitor’s browser and the web server. The first time someone requests a page, WordPress builds it as usual and Varnish keeps a copy. From the next request on, Varnish returns the stored copy immediately, with no PHP and no database queries.
You notice the result in two places. The first is load time, because a ready-made page is sent faster than one built from scratch. The second is server load: when most requests are answered from the cache, a small server can serve many more visitors at once. This matters most on a sale day, during a paid campaign, or after an article that brought sudden traffic.
According to Cloudways’ official documentation (updated August 2025), the Varnish version on the servers is 6.0.x, and it is active by default on every new server. One more useful detail: if the web server stalls for a moment, Varnish can still serve the pages it has already stored.
Which applications Varnish works with
| Application | Varnish compatibility | Note |
|---|---|---|
| WordPress (including WooCommerce and Multisite) | Fully compatible | Exclusions for the cart, checkout and account area are preconfigured |
| Magento 2 | Fully compatible | Uses Magento’s own VCL file, with no extra plugin |
| Laravel | Not compatible | Turn Varnish off at the application level |
| Custom PHP | Not compatible | Turn Varnish off at the application level |
Varnish vs the other cache layers
A Cloudways server has several cache layers, and each does something different. They do not compete with each other; they complement each other.
| Layer | What it stores | Where it runs | When it helps most |
|---|---|---|---|
| Varnish | Whole pages | On the server, before WordPress | Anonymous visitors, traffic spikes |
| Redis / Object Cache | Results of database queries | On the server, inside WordPress | Logged-in users, WooCommerce, the admin area |
| Breeze | HTML files, CSS/JS minification, purge management | A WordPress plugin | File optimization and automatic Varnish purging |
| CDN (for example Cloudflare) | Files and pages on edge servers | Outside the server, close to the visitor | A global audience, taking load off the server |
The key point: Varnish on its own does not know when you publish a new post. What tells it to purge the old copies is the Breeze plugin, through the Auto Purge Varnish option. Without a plugin like that, an old page can stay in the cache until its lifetime runs out. To pick the right plugin, read the comparison of cache plugins for Cloudways.
Before you start
- Access to the platform with permission for the server and the application (the account owner, or a team member with the right permissions).
- Know what runs on the server. Turning Varnish on or off and changing the TTL apply to all applications on the server, including Staging environments.
- On a WordPress site, make sure Breeze is installed and that Auto Purge Varnish is ticked (in the plugin’s Varnish tab).
- Exclusions do not delete pages that are already stored. After you add a rule, purge the cache (see the guide to clearing the cache).
How to turn Varnish on or off on a server
This is the master setting. When it is off, no application on the server gets Varnish caching.
- Log in to the platform and open the Servers tab under Flexible.
- Choose the server you want.
- In the server menu, go to Manage Services.
- On the Varnish row, click Enable to turn it on or Disable to turn it off.
How to turn Varnish off for a single application
Useful when the same server hosts a WordPress site and next to it a Laravel or custom PHP application. Varnish stays active for the other sites.
- Make sure Varnish is on at the server level (the previous section).
- In the Servers tab, choose the server, click www and choose the application.
- In the application menu, go to Application Settings.
- In the General tab, turn off the Varnish toggle.
- Confirm with OK.

How to exclude URLs and cookies from Varnish (exclusion rules)
Here is when you need exclusion rules, what is already excluded out of the box, and how to add a rule of your own.
What is already excluded by default
Cloudways ships a Varnish configuration file (a VCL file) that already excludes what must not be cached. On most sites you do not need to add anything. Here are the main WordPress exclusions:
| Group | Examples of what is excluded |
|---|---|
| General | All POST requests, and sites protected with an HTTP password |
| WordPress | /wp-login.php, /wp-admin, /wp-json, /wp-cron, /xmlrpc.php, preview (?preview=true), the RSS feed |
| WooCommerce | /cart, /checkout, /my-account, /wc-api, /?add-to-cart=, /logout, /lost-password |
| Cookies | wordpress_logged_in, wp-postpass, wordpress_comment_, woocommerce_cart, woocommerce_session |
| Easy Digital Downloads | EDD pages and cookies |
When to add an exclusion anyway
- Custom dynamic pages: a booking system, a price calculator, a form with a remaining-spots counter.
- A plugin that sets its own session cookie: for example a membership or account-area plugin that is not WooCommerce.
Adding an exclusion rule, step by step
- In the Servers tab, choose the server, click www and choose the application.
- Go to Application Settings and switch to the Varnish tab.
- Click Add New Exclusion.
- In the Type field, choose URL (an address) or Cookie.
- In the Value field, type a relative path (for example
/booking/) or the full cookie name. - Click Save, and then purge the Varnish cache so the old copies are deleted.

Three rules worth remembering. Only relative paths work: /mypage.php yes, a full https address no. Regular expressions (Regex) are allowed. And a partial path like /booking/ also excludes everything beneath it, such as /booking/list. The rules you added appear on the same screen, and you can edit or delete them at any time.
What Ignore Query String is and when to turn it on
A query string is everything that comes after the question mark in a URL, for example ?utm_source=facebook or ?fbclid=.... Facebook, Google Ads and email tools add parameters like these to every click.
The problem: by default Varnish treats every URL with a different parameter as a new page. Since fbclid is unique to each click, every visitor from a Facebook campaign gets a page that is not served from the cache. The very visitors you paid for get the slowest page.
When you turn on Ignore Query String, Varnish ignores well-known tracking parameters and serves everyone the same stored copy. The list includes, among others, utm_* (all UTM parameters), fbclid, gclid, msclkid, mc_cid and mc_eid. The option is available only in the new interface, and only when Varnish is on both on the server and in the application.
- In the Servers tab, choose the server, click www and choose the application.
- In the application menu, go to Application Settings.
- Switch to the General tab.
- Turn on the Ignore Query String toggle.
- Confirm in the window that opens by clicking Confirm.

When not to turn it on: Cloudways notes that the option may affect third-party tracking and analytics tools. If your campaigns depend on reading the parameters on the server side (for example a plugin that preserves UTM values in a contact form), test it in a Staging environment first. Another option Cloudways mentions is WP Rocket, which lets you manage the parameters without stripping them.
How to change the cache lifetime (Varnish TTL)
TTL (Time To Live) is how long Varnish keeps a copy before it asks for a fresh version. The default on Cloudways is 4 hours. The change is made at the server level, so it affects all the applications on it.
- In the Servers tab, choose the server.
- In the server menu, go to Settings & Packages.
- Switch to the Advanced tab and scroll to Cache Lifetime under Varnish.
- Choose a value, for example 4, 8, 14 or 24 hours.
- Click Save Changes.

| Site type | A TTL that usually fits | Why |
|---|---|---|
| A brochure site that is rarely updated | 14–24 hours | More requests are answered from the cache, less load |
| A blog or magazine with daily publishing | 4–8 hours | Breeze purges on every publish anyway; a medium TTL is a safety net |
| A news site or promotions that change every hour | 4 hours (the default) | Less risk that a visitor sees an old price or headline |
The recommendations in the table come from experience, not from a Cloudways rule. The official rule is simple: if you change content often, set a low value; if the content is stable, a high one.
The code BFCM802 takes 80% off your bill for the first two months (up to $200 off per month), including unlimited free site migrations. New customers only, and only until the offer ends.
The offer ends on December 4, 2026 at 23:59 (UTC+2).
Start with a free trial, no credit card. Enter the code at checkout and check that it shows up.
After Black Friday: 30% off for 3 months with the code ASAEL. On a large server (above about $444 a month) ASAEL already saves more today. BFCM802 vs. ASAEL calculator
Start a free trial server, no credit card. When you move to a paid plan, the code ASAEL takes 30% off your bill for the first three months.
The link fills in the code on the signup form. Just make sure it shows up.
Common mistakes and how to fix them
I changed something on the site and I still see the old version: the page is sitting in the cache. Make sure Auto Purge Varnish in Breeze is ticked, and purge manually through Purge Varnish Cache in the plugin, or through the Purge button in the Purge Site Cache section of the General tab in the application settings.
A visitor sees someone else’s cart, or an empty cart: almost always a cart or checkout page with a custom URL that was not excluded. Add a URL exclusion for the translated path and purge the cache. More on cart and checkout caching in WooCommerce cache and cart issues.
Pages are not cached at all (a constant MISS): the usual cause is a cookie that a plugin sets for every visitor, which makes Varnish skip the cache. Temporarily turn off plugins that set cookies (the documentation mentions WordPress Download Manager, for example) and check again.
Login, a session or a form does not work on a particular page: by default Varnish does not always pass the Cookie header to PHP. Exclude that URL so the request goes straight to the server.
A 404 page keeps showing after you fixed it: Varnish also caches 404 pages, for five minutes. Wait a few minutes or purge the cache.
A Laravel application behaves strangely: Varnish is not compatible with Laravel and Custom PHP. Turn it off for that application only.
Sources
This page is based on the following official documentation and pages:
- How to use Varnish at Cloudways (Cloudways Knowledge Base)
- How to enable ignore query string for Varnish Cache (Cloudways Knowledge Base)
- Varnish Cache Documentation
Frequently asked questions
Yes. Varnish is installed and active by default on every new server, and applies to all applications on the server. You can turn it off for the whole server through Manage Services, or for a specific application only through Application Settings.
Yes. According to Cloudways, applications and plugins that support Varnish on the platform also work with HTTPS, so you do not have to choose between an SSL certificate and caching.
Usually yes. Varnish works at the server level, before WordPress even loads, and the cache plugin manages its purging and file optimization. The Breeze and Varnish combination is preconfigured on Cloudways.
In most cases no, because browser-side tracking tools read the URL the visitor sees. Cloudways notes that the option may affect third-party tracking, so if you have a plugin that reads UTM values on the server side, test in a Staging environment first.
4 hours. You can change it to 8, 14 or 24 hours through Settings & Packages in the Advanced tab. The change applies to all applications on the server.
Yes. You add a URL-type exclusion rule with the page’s relative path. The official documentation explicitly recommends adding translated paths, such as a cart or checkout in another language, because the built-in exclusions only know the English paths.
Related guides
- Which cache plugin to choose on Cloudways: Breeze, WP Rocket or W3 Total Cache
- How to speed up a WordPress site on Cloudways
- Advanced settings in Breeze
- Connecting a CDN to Breeze
- Cloudways pricing
- All guides in this category: Performance and speed guides
Official source: How to Use Varnish at Cloudways, How to Enable ‘Ignore Query String’ for Varnish Cache (Cloudways Knowledge Base). Written and checked by Asael Dreyer · Updated: 6 Nov 2026
Disclosure: this is an independent site, not the official Cloudways site. Some links on this site are affiliate links: if you sign up through them we earn a commission, at no extra cost to you. Full details