Use Varnish as the reverse proxy that receives public requests, keep Apache or Nginx on a private origin port such as 8080, and let W3 Total Cache (W3TC) coordinate WordPress page caching and purge requests. A reliable setup depends on three things: matching ports, authorizing purge requests in Varnish, and excluding every response that is private or personalized.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
How the WordPress, W3TC and Varnish stack fits together
The request path should be explicit before you change any configuration:
As an Amazon Associate I earn from qualifying purchases.
Recommended Free Tools
- A visitor connects to Varnish on the public HTTP or HTTPS endpoint.
- Varnish serves a cached response when a valid object exists.
- For a miss, Varnish forwards the request to Apache or Nginx on the origin port.
- WordPress generates the response, while W3TC applies its page-cache and compatibility rules.
- Varnish stores an eligible public response and returns it to the visitor.
Varnish is responsible for storing and serving cached responses. WordPress must trigger invalidation when a post, page, theme, or setting changes. WordPress Developer Resources describes Varnish as especially powerful when paired with a WordPress caching plugin such as W3TC.
W3TC does not replace Varnish. Its reverse-proxy integration gives WordPress a way to request purges and coordinate page-cache behavior. If either side is missing, you can get fast but stale pages, or repeated origin requests with no useful cache.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Prerequisites and topology decisions
Choose where Varnish runs
Varnish can run on the same host as WordPress or on a separate machine. A same-host deployment is simpler, but both services must have non-conflicting listeners. A separate Varnish host adds network and firewall work but can isolate proxy capacity from the origin.
- Record the public address and port that Varnish will accept.
- Record the origin address and port that only Varnish should reach.
- Confirm where TLS terminates: at Varnish, at another proxy, or at a hosting provider.
- Ensure you can edit the web-server virtual hosts, Varnish VCL, and WordPress administrator settings.
- Back up the current web-server configuration and VCL before changing listeners.
Decide what should be cached
Public, anonymous HTML is the normal target. Logged-in dashboards, account pages, carts, checkout, form submissions, previews, and responses containing user-specific data must bypass shared page caching. Make this decision before enabling a broad cache so a private response cannot become the object served to everyone.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePut Apache or Nginx behind Varnish
Varnish normally owns the public listener. The origin web server therefore moves to another port; 8080 is a common example, not a requirement.
| Origin server | Typical change | After editing |
|---|---|---|
| Apache | Change Listen 80 to Listen 8080. Change each virtual host from <VirtualHost *:80> to <VirtualHost *:8080>. |
Restart Apache and verify that the site answers on the origin port. |
| Nginx | Change listen 80; to listen 8080; in each relevant server block. |
Reload or restart Nginx and verify the origin directly. |
These edits follow the Varnish Software tutorial. Adapt the number to your deployment if another service already uses 8080 or your provider requires a different backend port. Do not leave an origin listener publicly exposed when it is intended to be reached only through Varnish; restrict it with the host firewall or provider network controls.
Apache sequence
- Back up the Apache configuration.
- Replace the global
Listen 80directive with the chosen origin port. - Update every WordPress virtual host to the same port.
- Restart Apache.
- Request the origin directly from the local host or private network and confirm that WordPress loads without passing through Varnish.
Nginx sequence
- Back up the Nginx configuration.
- Change the
listendirective in each WordPress server block. - Reload or restart Nginx.
- Test the origin address and port directly before changing Varnish.
Define the Varnish backend and purge access
Edit /etc/varnish/default.vcl (or the path used by your service) so the backend points to the origin. The vendor example is:
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
backend default {
.host = "127.0.0.1";
.port = "8080";
}
acl purge {
"localhost";
"127.0.0.1";
"::1";
}
Change .host and .port when the origin is remote or uses another port. The purge ACL is a security boundary: add only the addresses that are allowed to invalidate cache objects. Never replace it with an unrestricted network range simply to make a plugin work.
Keep the request-normalization behavior
The same VCL example removes empty query strings, sorts query parameters, unsets the Proxy header, and sets X-Forwarded-Proto so the origin can distinguish HTTP from HTTPS. Preserve those behaviors unless your infrastructure has a documented reason to change them. Query normalization can prevent needless duplicate cache objects; removing an incoming Proxy header avoids treating client-supplied proxy metadata as trusted; forwarding the scheme helps WordPress generate correct redirects, URLs, and cookies.
Load and protect the VCL
- Validate the edited VCL with the validation method supplied by your Varnish package or hosting provider.
- Reload Varnish only after the backend and ACL validate.
- Check the service log for syntax errors or backend connection failures.
- Confirm that the public listener is Varnish and the origin listener is the port you configured above.
Provider-managed Varnish may not permit direct VCL edits. In that case, use the provider’s documented backend port and purge endpoint rather than copying a self-managed configuration unchanged.
Set up a purge path that WordPress can use
Purging is a two-part operation. WordPress must send an invalidation request, and Varnish must authorize and process it. Varnish Software summarizes the division of responsibility this way: WordPress content entering the cache is Varnish’s job, while removing outdated content must be triggered by WordPress.
Option 1: a purge plugin
The Varnish Software tutorial uses the Proxy Cache Purge plugin. It sends an HTTP PURGE request when content changes. Your VCL must recognize that method, check the purge ACL, and invalidate the requested object or URL set. Install and configure the plugin only after the ACL contains the address from which the request will originate.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsRank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Option 2: W3TC reverse-proxy integration
W3TC can expose Varnish purge controls in its Reverse Proxy settings. This avoids running a separate purge plugin when the host supports W3TC’s integration, but the same ACL and network requirements still apply. A button in WordPress cannot purge a remote Varnish instance that blocks the request or points at the wrong address.
Publish and purge events to cover
- New posts and pages.
- Edits to existing content.
- Changes to front-page, archive, category, tag, and author listings.
- Theme and plugin changes that alter rendered HTML or headers.
- Changes to menus, widgets, or site-wide options.
- Manual cache clears after changing VCL or W3TC settings.
Test one edited URL and at least one listing page. A single URL purge can leave an archive or homepage stale if your purge logic does not invalidate related objects.
Configure W3 Total Cache in WordPress
General Settings and page cache
- In the WordPress dashboard, open Performance > General Settings.
- Enable Page Cache.
- Choose a storage method that the host actually provides. Disk: Enhanced is a hosting-specific example; it is not a universal requirement.
- Save the settings, then open the detailed Page Cache settings and review exclusions before testing public traffic.
W3TC documentation recommends the advanced Page Cache Compatibility mode for interoperability with WordPress. It is disabled by default. The same documentation reports that disk-enhanced page-cache performance in its load tests decreased by about 20% at scale when Compatibility mode was enabled. That is a vendor-reported test trade-off, not a guaranteed result for every site; measure your own workload before choosing raw throughput over compatibility.
Optional database, object, and browser caches
Enable additional cache layers only when the corresponding backend is available and supported by your host.
| W3TC component | Hosting-specific example | Decision rule |
|---|---|---|
| Page Cache | Disk: Enhanced | Use a supported page-cache method and verify that dynamic pages are excluded. |
| Database Cache | Memcached | Enable only when a reliable Memcached service is provisioned. |
| Object Cache | APC/APCu | Enable only when the PHP runtime and host provide the selected object-cache backend. |
| Browser Cache | Enabled in the hosting example | Use headers that match your update and rollback needs; long lifetimes can preserve old assets in browsers. |
The combinations above come from a hosting example and should not be treated as default settings for every server. An unavailable backend can create errors or add overhead rather than improve performance.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Reverse Proxy settings
- Open Performance > General Settings > Reverse Proxy.
- Enable Varnish cache purging.
- Enter the Varnish server address reachable from the WordPress application.
- Use the provider-required port. In one documented SSL setup, the Varnish server entry uses port 8080; your deployment may differ.
- Save the settings and perform a manual purge.
These controls work only when Varnish is enabled and reachable for the application. If the purge test fails, check DNS or the address, the port, firewall rules, and the VCL ACL before changing cache settings.
Exclude private and dynamic responses
Shared page caching is safe only when the response is identical for every anonymous visitor. Build exclusions deliberately rather than relying on a generic cookie rule.
Users and cookies
- Bypass cache for logged-in users.
- Bypass requests carrying authentication or session cookies.
- Be cautious with commenter cookies and any cookie that changes displayed content.
- Never cache a response that contains another user’s name, order data, account details, or nonce-specific output.
Commerce, forms, and account workflows
- Mark cart and checkout pages as Never cache.
- Exclude account, login, registration, and order-history pages.
- Exclude form pages and form-processing endpoints; W3TC documentation specifically advises marking form pages as Never cache.
- Exclude payment, password-reset, preview, and confirmation responses.
AJAX and API requests
Do not assume an endpoint is public merely because its URL is not an HTML page. Review AJAX actions and API routes for authentication, nonce values, or user-specific output. Cache only a response whose headers, cookies, and body are intentionally identical for all eligible visitors.
Use a safe fallback
When you cannot prove that a route is public and repeatable, bypass cache for it. A small reduction in cache hit rate is safer than leaking personalized content. Keep a written list of exclusions so a future plugin or theme change does not silently make a private route cacheable.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Handle HTTPS and forwarded scheme information
Decide where TLS terminates and make every layer agree. If Varnish receives HTTPS and forwards HTTP to the origin, it must pass the original scheme. The VCL example sets X-Forwarded-Proto when the request arrives over HTTPS.
Best Value
- Set WordPress’s site and home URLs to the intended HTTPS scheme.
- Ensure the proxy sets and the origin trusts the forwarded scheme only from the proxy network.
- Check canonical redirects for loops between HTTP and HTTPS.
- Check that secure cookies are issued on HTTPS and are not lost at the proxy.
- Ensure the cache key does not mix HTTP and HTTPS variants.
- Use the backend port required by your host’s SSL architecture; do not assume the public HTTPS port is also the origin port.
After changing scheme handling, purge all existing objects. A cached redirect or page generated under the wrong scheme can remain visible until invalidated.
Verify the configuration safely
Verification should test both freshness and privacy, not just whether the homepage loads.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →- Save W3TC settings and purge W3TC’s page cache.
- Send a purge request through the configured integration and confirm that Varnish accepts it from an address in the ACL.
- Open a public URL in a private browser window. The first request may be a miss; request it again and inspect response headers for the cache status your provider exposes.
- Open the same URL while logged in. Confirm that the response is not served as a shared public object.
- Submit a form or walk through a cart and checkout flow. Confirm that no step is cached or replayed.
- Publish or edit a post, then check the post URL, homepage, and relevant archive. The updated content should appear after the purge completes.
- Change a theme, plugin, or VCL rule, purge again, and verify that the new output and headers are present.
- Repeat the checks over HTTPS and confirm redirects, cookies, and canonical URLs.
Record the headers and observed timings from your own environment. There is no universal hit-rate or latency benchmark established for this configuration.
Troubleshoot the failures that matter most
| Symptom | Likely cause | Correction |
|---|---|---|
| Varnish returns a backend error or 503 | The backend host or port is wrong, or Apache/Nginx is not listening there. | Test the origin directly, correct .host or .port, and reload Varnish after validation. |
| WordPress changes remain stale | No purge mechanism is active, the purge address is blocked, or the VCL rejects the method. | Check W3TC Reverse Proxy settings or the purge plugin, then align the sender address with the purge ACL. |
| Purge is forbidden | The requesting address is not in the ACL. | Add only the trusted WordPress or proxy address, then reload Varnish. Do not open purge access publicly. |
| Logged-in users see cached content | Cookie or authentication exclusions are incomplete. | Bypass logged-in and session-cookie requests and purge objects created before the rule changed. |
| Checkout or forms behave unpredictably | A dynamic route is being cached. | Mark the page and processing endpoints as Never cache and test the complete workflow while logged out and logged in. |
| HTTPS redirect loop or mixed scheme | The origin does not receive the original scheme or WordPress URLs disagree with the proxy. | Set and trust X-Forwarded-Proto from the proxy, correct site URLs, then purge. |
| Duplicate or inconsistent cache entries | Query strings are not normalized or the Proxy header is being trusted. |
Review the VCL behavior that removes empty queries, sorts parameters, and unsets the incoming Proxy header. |
Self-managed versus managed Varnish
The technical goals are the same, but operational responsibility changes with the deployment model.
| Decision axis | Self-managed Varnish | Managed hosting or provider Varnish |
|---|---|---|
| Control | Full control of VCL, listeners, ACLs, and backend ports. | Provider controls some or all VCL and networking; use its documented labels and ports. |
| Invalidation | You must connect W3TC or a purge plugin to the correct endpoint and protect the ACL. | Confirm that the provider exposes purge support and permits W3TC requests. |
| Dynamic-content safety | You maintain exclusions and test every private route. | Review the provider’s defaults, then add application-specific exclusions. |
| TLS and networking | You choose the termination point and forwarded headers. | Follow the provider’s SSL topology and backend-port requirement. |
| Operations | You own upgrades, monitoring, rollback, and incident response. | The provider handles more infrastructure, but support boundaries and change controls apply. |
Ongoing maintenance checklist
- Keep a backup of the working web-server and VCL configuration.
- After every WordPress, theme, or plugin update, test anonymous, logged-in, form, and commerce requests.
- Purge after changes that alter rendered HTML, redirects, cookies, or cache rules.
- Review the purge ACL whenever the WordPress host, proxy, or network address changes.
- Watch for new cookies and endpoints introduced by plugins.
- Recheck HTTPS forwarding after certificate, load-balancer, or hosting changes.
- Measure cache headers and timings in your own environment instead of assuming the vendor’s load-test results apply to your site.
What a correct configuration looks like
Varnish owns the public endpoint, Apache or Nginx listens on the configured origin port, and the VCL backend points to that exact address. W3TC has page caching enabled with a supported storage method, its Reverse Proxy section can reach Varnish, and the purge ACL accepts only that trusted source. Anonymous public pages can be cached; logged-in, personalized, form, account, cart, and checkout responses cannot. HTTPS scheme forwarding, WordPress URLs, cookies, and cache keys agree. Finally, a publish or edit event purges the affected objects and your verification tests show fresh public content without exposing private responses.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

