Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk9 min

Does WordPress on Ubuntu Have Caching by Default? What Actually Runs

WordPress on Ubuntu does not enable full-page or persistent object caching by default. Learn the difference between cache layers, verify your server, and choose a safe setup.
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 page caching or a persistent object-cache service. WordPress core does keep database and application objects in PHP memory while an individual request is running, but that in-memory cache is discarded when the request ends. To reuse complete pages or objects across requests, you must add a plugin, server configuration, hosting feature, or separate cache service.

The short answer

Ubuntu does not change WordPress’s caching defaults. Canonical’s standard Ubuntu installation procedure installs WordPress from WordPress.org on Apache2, creates a virtual host, enables URL rewriting, and publishes the site. It does not add a page-cache plugin, Redis or Memcached service, 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 means a newly installed site normally renders each front-end request through WordPress and PHP. PHP and the web server may still have their own performance features, such as OPcache or browser cache headers, but those are separate from WordPress page caching and are not implied by installing Ubuntu.

What “caching” can mean in WordPress

Several different mechanisms are commonly called “the cache.” They store different data, run in different places, and have different invalidation rules. Confusing them is the main reason an administrator may think caching is enabled when it is not.

WordPress’s built-in object cache

During a request, WordPress stores database results and other application objects in an in-memory object-cache system. If the same object is needed again before that request finishes, WordPress can reuse it instead of repeating the lookup.

The WordPress Developer Reference describes the default behavior precisely: By default, the object cache is non-persistent. When the PHP request ends, the contents disappear. The next request starts with an empty object cache unless a persistent backend has been installed.

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.

Full-page cache

A page cache stores the final HTML response generated for a URL. For an eligible request, the cached HTML can be returned without booting WordPress and running the normal PHP code again. This is usually the most visible form of caching because anonymous visitors may receive a static response.

WordPress core does not create this page cache. A plugin can write static cache files, while a reverse proxy such as Varnish or a web-server cache such as Nginx fastcgi_cache can store responses outside WordPress.

Persistent object cache

A persistent object cache keeps WordPress objects available after one request ends. Common backends include Redis, Memcached, APC, or another service supplied by the host or operated on Ubuntu. This reduces repeated database and application work, but it does not automatically create static HTML pages.

WordPress loads a persistent integration through an object-cache.php drop-in in wp-content. The file must exist and connect to a working backend; merely having a Redis or Memcached package installed does not prove that WordPress is using it.

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

Browser, CDN, and opcode caching

HTTP response headers can tell a browser or CDN to retain images, stylesheets, JavaScript, or even HTML for a specified period. A CDN may also cache content at edge locations. PHP OPcache stores compiled PHP bytecode in memory so PHP does not have to compile the same scripts repeatedly.

These layers can coexist with WordPress caching, but none is the same as WordPress’s request-local object cache. A site can have OPcache enabled and still have no full-page cache, or have a page cache while its object cache remains non-persistent.

Layer What it stores Where it runs Present in a normal Ubuntu WordPress install?
Core object cache Database and application objects during one request PHP memory Yes, but it is non-persistent
Page cache Complete rendered HTML responses WordPress plugin, reverse proxy, or web server No; it must be configured
Persistent object cache Reusable WordPress objects between requests Redis, Memcached, APC, or another backend No; a drop-in and backend are required
Browser or CDN cache HTTP assets and, if configured, HTML responses Visitor’s browser or an edge network Only if headers or a CDN policy enable it
Opcode cache Compiled PHP bytecode PHP runtime Environment-dependent, not a WordPress page cache

Why Ubuntu itself does not enable WordPress caching

Ubuntu is the operating system and installation environment. It supplies packages and services, but it does not silently choose WordPress plugins or cache policies for a site. The official Ubuntu WordPress procedure configures Apache2 and URL rewriting; its baseline does not include a page-cache plugin, a persistent object-cache drop-in, a Varnish layer, or Nginx FastCGI caching.

Hosting companies can add their own controls. A managed Ubuntu image might preinstall a plugin, configure a CDN, or expose a Redis service, while a manually built server might have none of those. Therefore, “WordPress on Ubuntu” is not enough information to determine the cache state: the installed files, active plugins, headers, and web-server configuration are what matter.

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

Does WP_CACHE mean pages are cached?

No. The WordPress Advanced Administration Handbook states, WP_CACHE does not enable caching by itself. Setting the constant to true tells WordPress to try loading wp-content/advanced-cache.php. A compatible plugin or platform must create and maintain that drop-in for page caching to occur.

Consequently, these situations are all possible:

  • WP_CACHE is absent and no page cache is active.
  • WP_CACHE is set to true, but advanced-cache.php is missing, so no WordPress page-cache implementation is loaded.
  • WP_CACHE is set and the drop-in exists, but the cache is disabled, bypassed, or failing because of configuration.
  • A server or CDN serves cached HTML without using WordPress’s WP_CACHE mechanism at all.

Treat the constant as a loader flag, not as proof that a visitor is receiving cached HTML.

How to check what is actually enabled

Perform these checks on the running site rather than inferring behavior from the operating system. Use the WordPress installation’s document root when running file commands.

1. Look for WordPress cache drop-ins

Check whether the two special files exist in wp-content:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
test -f wp-content/advanced-cache.php && echo "page-cache drop-in found" || echo "no page-cache drop-in"
test -f wp-content/object-cache.php && echo "object-cache drop-in found" || echo "no persistent object-cache drop-in"

Open each file or identify its owner before changing anything. advanced-cache.php is normally associated with a page-cache implementation. object-cache.php should reveal whether it connects to Redis, Memcached, or another backend. Do not delete either file casually: removing a drop-in can disable a site’s cache integration.

2. Inspect configuration and active plugins

Search wp-config.php for the WP_CACHE constant, then review the Plugins screen for page-cache and object-cache integrations. Also inspect your hosting control panel for labels such as page cache, edge cache, CDN cache, Redis, or object cache. A host-level feature may not appear as a WordPress plugin.

Plugin activation alone is not a complete test. Some plugins require a writable cache directory, a warm-up request, an external service, or an explicit “enable” switch. Read the plugin’s status screen and confirm that it reports a functioning cache.

3. Inspect response headers

Request a public URL and examine its headers:

curl -I https://example.com/

Look for cache-related indicators such as Cache-Control, Age, ETag, X-Cache, or a vendor-specific hit/miss header. Header names vary, and their absence does not conclusively prove that no cache exists; some systems deliberately hide diagnostic headers. Compare two requests and check the actual server configuration as well.

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

4. Check Apache, Nginx, or Varnish configuration

Apache may send cache-control headers without storing complete pages. Nginx page caching requires explicit directives such as a cache zone, a cache key, and fastcgi_cache, plus rules deciding when to bypass or purge entries. Varnish likewise needs a configured backend, request rules, and invalidation behavior.

Review the virtual-host and reverse-proxy configuration for those directives. Installing Ubuntu, Apache2, or Nginx alone does not imply that any of them is active. If you cannot read the service configuration, ask the host which layer terminates HTTP requests and where its cache policy is defined.

5. Test bypass cases

Page caches commonly serve only anonymous, cacheable GET or HEAD requests. Logged-in users, administrators, requests carrying session cookies, POST requests, cart or checkout pages, and URLs with certain query strings are often bypassed. This behavior is configuration-dependent, so test both a logged-out browser and an authenticated session.

Publish a harmless content change, request the page, and verify when the new version appears. If the old version persists, identify whether the stale copy is in a WordPress page cache, a reverse proxy, a CDN, or a browser. Purging one layer does not necessarily purge the others.

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

Ways to add caching on an Ubuntu WordPress server

Use a 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. A plugin is often the simplest route when you administer WordPress but do not control the entire web-server stack.

After installation, configure the cache method, choose which requests are eligible, set an expiration policy, and test purge behavior. Exclude pages that contain private or rapidly changing data. Confirm that the plugin creates the expected drop-in or cache files and that anonymous requests receive the intended response.

Configure a server-side page cache

Varnish can sit in front of WordPress and cache responses before they reach Apache or PHP. Nginx can use fastcgi_cache when Nginx handles the request and PHP connection. Both approaches require explicit design for cache keys, cookies, query strings, logged-in users, POST requests, purging, and failures.

Server caching can be efficient because cache hits avoid most WordPress execution, but an incorrect bypass rule can expose personalized content or serve stale data. Treat purge and privacy rules as part of the implementation, not as optional tuning.

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

Add persistent object caching

Install an object-cache.php integration and provide a reachable Redis, Memcached, or similar service. The integration must match the backend, credentials, network policy, and WordPress installation. Verify that the drop-in is loaded and that the backend reports connections and keys.

Persistent object caching targets repeated database and application lookups. It complements, rather than replaces, a page cache: a page-cache hit may avoid WordPress entirely, while an object cache helps requests that still need WordPress to run, such as uncached pages, administrative screens, and personalized responses.

Configure browser, CDN, or opcode caching separately

Set appropriate HTTP headers for static assets and decide whether a CDN should cache HTML. Enable PHP OPcache according to the PHP package and hosting environment. These measures can reduce transfer or compilation work, but they do not turn the core request-local object cache into a persistent cache.

Approach Best fit Main operational concern
Page-cache plugin Sites managed primarily from WordPress Correct exclusions, writable cache files, and reliable purging
Varnish or Nginx page cache Administrators who control the HTTP stack Cache keys, privacy bypasses, invalidation, and configuration complexity
Persistent object cache Dynamic or database-heavy workloads Backend availability, memory limits, and a correctly installed drop-in
CDN or browser cache Static assets and geographically distributed visitors Cache-control headers, edge invalidation, and stale content

Common mistakes and how to correct them

“The site feels fast, so it must be cached.”

Fast storage, OPcache, a nearby server, or a small site can produce quick responses without a page cache. Verify files, headers, and server rules instead of using perceived speed as evidence.

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

“Redis is installed, so WordPress is using it.”

A Redis service can be present and completely unused. WordPress needs an object-cache integration in wp-content/object-cache.php, valid connection settings, and a reachable backend. Check all three.

“Turning on WP_CACHE fixed caching.”

The constant only causes WordPress to look for advanced-cache.php. Install and configure a compatible implementation, then verify that it is serving and purging pages.

“Purging the plugin cache cleared everything.”

Separate layers retain separate copies. A browser, CDN, Varnish, Nginx, and a WordPress plugin may each need its own purge. Establish the request path and clear the layer that supplied the stale response.

“Every URL should be cached.”

Private dashboards, account pages, carts, checkout flows, form submissions, and other personalized or state-changing requests generally need bypass rules. A cache policy that ignores cookies or request methods can serve the wrong user’s content.

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

Which cache should you add?

Start with the bottleneck and the layer you can operate. If anonymous visitors repeatedly request the same public pages, a page cache is the direct solution. If uncached requests spend time retrieving the same database objects, persistent object caching may help. If visitors are far from the server or static files dominate transfer time, browser or CDN caching addresses that problem.

Before enabling more than one layer, document the request path, exclusions, expiration times, and purge commands. Then test logged-out and logged-in requests, content updates, query-string URLs, POST requests, and error responses. Caching is useful only when it remains correct: the goal is not simply to store responses, but to serve the right response to the right request and remove it when the underlying content changes.

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 *

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.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.