October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

Does WordPress on Ubuntu Have Caching by Default? What’s Actually Enabled

A standard Ubuntu WordPress install does not automatically cache complete pages or use Redis/Memcached. Learn the cache layers, how WP_CACHE works, and how to verify your server.
Length9 min Posted Quest giverVGSources Team

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

No. A standard WordPress installation on Ubuntu does not automatically enable reusable full-page caching or a persistent object-cache service. WordPress does keep database and application objects in PHP memory while each request runs, but that memory is discarded when the request finishes. To cache complete HTML pages or reuse objects between requests, you must install and configure a plugin, web-server layer, CDN, or separate cache service.

What a normal Ubuntu WordPress installation includes

Ubuntu is the operating-system and hosting platform; it does not change WordPress core’s cache policy. Canonical’s standard Ubuntu walkthrough installs WordPress from WordPress.org on Apache2, creates a virtual host, enables URL rewriting, and publishes the site. The basic procedure does not add a page-cache plugin, Redis or Memcached, Varnish, or an Nginx FastCGI cache.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That baseline can still include ordinary web behaviour such as PHP processing, static-file delivery, and whatever HTTP headers your server sends. Those functions are not the same as storing a generated WordPress page for reuse. A site can therefore feel fast while having no WordPress page cache at all, or it can have browser and opcode caching without caching HTML responses.

The cache types you need to distinguish

“Caching” describes several different mechanisms. Knowing which one is present matters because each solves a different bottleneck and has different invalidation rules.

Layer What it stores Where it runs Present in a basic install? Persistence
WordPress object cache Database results and application objects used during a request PHP memory inside the current request Yes, as a core mechanism Non-persistent; discarded when the request ends
Page cache Rendered HTML for posts, pages, archives, and sometimes other public responses A WordPress plugin, reverse proxy, or web server No Reusable until expiry, purge, or replacement
Persistent object cache Reusable WordPress objects and query results Redis, Memcached, APC, or another backend connected through a drop-in No Survives individual requests; behaviour depends on the backend and configuration
Browser or CDN cache Images, stylesheets, JavaScript, fonts, and possibly HTML responses The visitor’s browser or an edge network Not implied by Ubuntu or WordPress Controlled by HTTP headers, edge rules, and expiry
Opcode cache Compiled PHP bytecode The PHP runtime, commonly through OPcache Environment-dependent Usually persists in server memory until reset or invalidated

WordPress’s built-in object cache

WordPress core can avoid repeating work during one request by retaining objects in memory. The WordPress Developer Reference describes the default as “non-persistent”: once PHP finishes handling the request, those objects are gone. The next page request starts with an empty in-process cache unless a persistent backend has been installed.

This mechanism does not save a finished page. WordPress still runs its bootstrap code, executes the request, loads templates, and renders HTML on later requests. It is useful within a request but should not be treated as a site-wide performance layer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Full-page caching

A page cache stores the final response, often as a static file or an entry in a reverse-proxy cache. A later anonymous visitor can receive that response without PHP rebuilding the page. Dynamic areas, logged-in sessions, carts, checkout pages, POST requests, and URLs with certain query strings normally require bypass rules rather than unconditional caching.

Persistent object caching

A persistent object cache keeps selected WordPress objects outside the PHP process so they can be reused by later requests. WordPress loads this integration through an object-cache.php drop-in. The drop-in must connect to a running backend such as Redis or Memcached; merely installing Ubuntu does not create either service or configure the connection.

Why WP_CACHE does not prove that pages are cached

The WP_CACHE constant is frequently misunderstood. WordPress’s Advanced Administration Handbook states that “WP_CACHE does not enable caching by itself.” When the constant is true, WordPress attempts to load wp-content/advanced-cache.php. A page-cache plugin or hosting platform must place a compatible drop-in there and implement the actual storage, generation, bypass, and purge logic.

Consequently, a line such as:

define('WP_CACHE', true);

is only a loader flag. If advanced-cache.php is absent, empty, or owned by a disabled integration, that line alone does not make rendered pages reusable. Treat the file and its owner as the evidence, not the constant in isolation.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to find out what your Ubuntu server is really doing

Use the following checks on the server and from a client. Replace /var/www/html with your actual document root and use the account that can read the WordPress files.

  1. Look for a page-cache drop-in. Run ls -l /var/www/html/wp-content/advanced-cache.php. If it exists, open it or inspect its ownership to identify the plugin or hosting platform that created it. Its presence indicates an integration is installed; it does not tell you whether every URL is cacheable.
  2. Look for an object-cache drop-in. Run ls -l /var/www/html/wp-content/object-cache.php. Read the file’s comments or documentation to determine whether it connects to Redis, Memcached, APC, or another backend. A file with no working backend can produce connection errors or fall back to non-persistent behaviour.
  3. Review active plugins and host controls. In the WordPress dashboard, open Plugins > Installed Plugins and check for a page-cache or object-cache integration. Also inspect your hosting control panel for CDN, edge-cache, or managed-cache switches. A host may supply a cache outside WordPress’s plugin list.
  4. Inspect response headers. From another machine, run curl -I https://example.com/ and repeat for a representative post. Look for Cache-Control, Age, ETag, X-Cache, or vendor-specific hit and miss headers. Header names differ by stack, and their absence does not conclusively prove that no cache exists, so compare them with the server configuration.
  5. Inspect the web-server configuration. Search Apache, Nginx, and reverse-proxy configuration for cache directives. For Nginx, look specifically for a configured fastcgi_cache_path, a fastcgi_cache zone, cache keys, bypass conditions, and purge rules. An Nginx installation without those directives is not automatically serving cached PHP responses.
  6. Check the backend service. If an integration claims to use Redis or Memcached, verify that the corresponding service is running, listening on the configured address, and reachable by the PHP worker account. A drop-in without a reachable backend is not a functioning persistent cache.

Ways to add reusable caching

Install a WordPress page-cache plugin

WordPress documentation identifies W3 Total Cache, WP Super Cache, and Cache Enabler as examples of plugins that can generate static files for posts and pages. After installation, configure the plugin’s page-cache method, exclusions, expiry, and purge behaviour. Confirm that it writes its drop-in, returns a cacheable response for anonymous visitors, and bypasses sensitive requests.

Plugin caching is usually the simplest route on a single Ubuntu server because its purge hooks can follow WordPress publishing events. Its effectiveness still depends on correct permissions, PHP and web-server integration, and exclusions for logged-in users or personalized content. Installing two page-cache systems at once can create conflicting headers, stale files, or unpredictable purges; choose one page-cache owner.

Put a reverse proxy or web-server cache in front

Varnish can sit in front of WordPress and store public responses. Nginx can use fastcgi_cache to cache PHP responses, but the cache zone, key, bypass rules, and purge behaviour must be written explicitly. A typical configuration must decide how to treat cookies, authorization headers, POST requests, query strings, previews, feeds, sitemaps, and administrator URLs. The Nginx handbook notes that a purge helper plugin may be needed so WordPress publishing events remove old entries.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Server-side caching can reduce PHP work for many sites, but it adds operational responsibility. A configuration mistake can serve one visitor’s personalized response to another, keep deleted content visible, or cache an error page. Test anonymous, logged-in, preview, comment, search, and form-submission paths after every change.

Add a persistent object-cache backend

Persistent object caching addresses repeated database and application-object work rather than complete HTML responses. Install an appropriate object-cache.php integration, provide a Redis, Memcached, or similar service, and configure the connection, authentication, namespace, and eviction policy. The service may run on the same Ubuntu host or be supplied by a managed platform.

Page caching and persistent object caching are complementary. A page cache can handle anonymous traffic without running WordPress at all; an object cache helps requests that must execute WordPress, such as administrator screens, personalized pages, uncached queries, and API operations. Adding both requires coordinated invalidation and enough memory for the combined workload.

Choosing the right layer

Need Most relevant layer Main decision Typical risk
Serve the same public HTML to many anonymous visitors Page cache or reverse proxy Define what can be cached and how publishing purges it Stale or personalized content being served publicly
Reduce repeated database and object lookups on dynamic requests Persistent object cache Select a backend and size its memory and eviction policy Connection failures or stale objects after data changes
Speed delivery of images and front-end assets Browser or CDN cache Set suitable HTTP freshness and invalidation headers Visitors retaining old assets after a deployment
Reduce PHP compilation overhead Opcode cache Configure OPcache memory and reset behaviour Old bytecode after code changes if invalidation is misconfigured

When comparing options, evaluate where the cache runs, whether entries persist across requests or servers, how logged-in users and query strings bypass it, how content is purged, and how much of the configuration your host supports. A managed service can reduce maintenance; a self-managed Ubuntu stack gives you control but makes testing, monitoring, and recovery your responsibility.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Invalidation and bypass rules you should plan before enabling a cache

  • Publishing and editing: purge the changed post, its archives, feeds, and any front page or taxonomy pages that display it.
  • Logged-in sessions: normally bypass full-page caching because dashboards, account details, and notices are user-specific.
  • Carts and checkout: exclude pages whose contents depend on a visitor’s session or payment state.
  • POST and other state-changing requests: do not cache the request, and ensure it cannot populate a cache entry accidentally.
  • Query strings: decide whether tracking parameters share the canonical entry or create separate entries; careless variation can multiply cache size.
  • Cookies and authorization: bypass responses containing private session cookies or authorization headers unless you have a deliberately safe vary strategy.
  • Deployments and outages: document a full purge procedure and a way to disable the cache if stale or incorrect responses appear.

Common symptoms and fixes

“I enabled WP_CACHE, but pages are still generated every time.”

Check for wp-content/advanced-cache.php and verify that an active integration owns it. Then inspect response headers and the plugin’s status screen. The constant without a drop-in is not a page-cache implementation.

“A persistent-cache plugin is installed, but it reports connection errors.”

Confirm that Redis or Memcached is installed and running, that the host and port match the drop-in, and that firewall and Unix-socket permissions allow the PHP worker to connect. If the backend is unavailable, remove or repair the integration rather than assuming the object cache is working.

“Visitors see old content after an update.”

Identify every layer that may hold the response: WordPress page files, Varnish or Nginx, a CDN, and browser storage. Purge from the innermost layer outward, then verify the changed URL with a fresh request and inspect its headers. Add publishing hooks or purge rules so the situation does not recur.

“The site is fast, so caching must be enabled.”

Speed alone does not identify the mechanism. OPcache, efficient database queries, browser caching, a CDN, or simply a small site can all improve response time. Use file checks, configuration inspection, and headers to establish which layer is active.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Practical decision checklist

  • Need faster anonymous page delivery? Start with one well-configured page-cache plugin or one reverse-proxy cache.
  • Need faster logged-in, administrative, or highly dynamic requests? Consider persistent object caching.
  • Need faster images and scripts worldwide? Configure browser or CDN caching separately from WordPress page caching.
  • Have no access to purge or test a layer? Do not enable it until you can invalidate entries safely.
  • Are you unsure what is enabled? Check both WordPress drop-ins, active plugins, response headers, and Apache/Nginx/Varnish configuration.

There is no current Ubuntu-specific benchmark in the available primary documentation that establishes a universal performance percentage for any of these choices. The correct setup depends on traffic patterns, dynamic features, hosting controls, and the quality of its bypass and purge rules.

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.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.