WordPress Caching Explained: Page Cache vs Object Cache vs Redis
Installing a caching plugin is often one of the first recommendations given to someone trying to speed up a WordPress website.
The advice sounds simple: install a plugin, enable caching and watch the website become faster.
But there is a problem with this approach.
WordPress does not have just one type of cache. It has several caching mechanisms that operate at different stages of a website request. Some store complete HTML pages. Others remember database results. Some reduce PHP execution overhead, while browser caching prevents visitors from repeatedly downloading unchanged files.
Redis introduces another layer by providing persistent storage for WordPress object caching.
These technologies solve different problems.
A website can have an excellent page cache but still perform poorly when administrators log in. Another website can use Redis and still generate slow pages because its frontend contains excessive JavaScript. Installing multiple caching plugins does not automatically make these problems disappear.
Understanding what each caching layer actually does is more useful than collecting optimisation plugins.
In this guide, we will examine how WordPress caching works, compare page caching with object caching and Redis, and explain which combination makes sense for different types of websites.
What is WordPress caching?
Caching is the process of temporarily storing information so that it can be reused instead of being generated or retrieved repeatedly.
Consider a normal WordPress page request.
When someone opens a blog article, WordPress may need to:
Load its core application.
Execute PHP code.
Load active plugins and the theme.
Retrieve content from the database.
Process additional information.
Generate the final HTML response.
This work takes time and consumes server resources.
Now imagine that hundreds of visitors open the same article.
Without an effective cache, the website may repeatedly perform much of the same work.
Caching reduces that repetition.
Instead of rebuilding everything for every visitor, WordPress or the server can reuse previously generated information.
The important question is: Which information should be stored, and at which stage should it be reused?
That is where the different caching mechanisms become important.
1. Page caching: Store the complete HTML response
Page caching is usually the most noticeable caching improvement for a content-focused WordPress website.
It works by storing the generated HTML of a page.
When another visitor requests the same cacheable page, the server can deliver the stored response without executing the entire WordPress application again.
How page caching works
Imagine someone visits:
https://example.com/wordpress-guide/
On the first request:
WordPress processes the request.
PHP executes the necessary application code.
Database queries retrieve the content.
WordPress generates the HTML.
The caching system stores the generated page.
On a subsequent eligible request:
The caching system checks whether a valid cached page exists.
If it does, the stored HTML is returned.
WordPress may not need to execute the normal PHP and database processing path.
This reduces server workload and can improve response times significantly.
What does page caching store?
Typically, page caching stores the complete HTML response for a particular URL and cache variation.
Depending on the implementation, variations may account for factors such as cookies, device characteristics, language or other request conditions.
When should you use page caching?
Page caching is particularly useful for:
Blogs.
News websites.
Business websites.
Documentation websites.
Portfolio websites.
Mostly static landing pages.
These websites frequently serve the same content to many visitors.
When can page caching become complicated?
Dynamic websites require more careful configuration.
For example, an ecommerce website may display:
Personalised product recommendations.
Shopping cart information.
Customer account details.
Location-specific prices.
Dynamic inventory information.
Serving one visitor’s personalised HTML to another visitor would be incorrect.
That is why cart, checkout and account-related pages commonly require cache exclusions or specialised cache handling.
Page caching is powerful, but only when the correct content is cached for the correct visitor.
2. Object caching: Store individual pieces of application data
Object caching operates at a different level.
Instead of storing an entire HTML page, it stores individual pieces of information that WordPress or its plugins retrieve during execution.
Examples include:
Database query results.
Frequently accessed configuration values.
User-related data.
Taxonomy information.
Complex application calculations.
Reusable data generated by plugins.
WordPress provides an Object Cache API that developers can use to store and retrieve these values.
For example:
wp_cache_set(
'popular_posts',
$posts,
'my_plugin',
3600
);A later request can retrieve the stored value:
$posts = wp_cache_get(
'popular_posts',
'my_plugin'
);The cache group helps organise related values, while the expiration parameter controls how long the value should remain available.
The important limitation of WordPress’s default object cache
Many website owners assume that WordPress automatically remembers object-cache data between separate page requests.
That is not generally true.
By default, WordPress’s built-in object cache is non-persistent. Its stored data normally exists only during the current request.
When the request ends, that in-memory cache is lost.
This means another request may have to retrieve the same database information again.
A persistent object cache changes this behaviour by storing cache values outside the individual PHP request.
Redis and Memcached are common technologies used for this purpose.
This distinction is important because simply using the WordPress Object Cache API does not automatically mean you have persistent caching.
When does object caching help?
It can be particularly useful when a website repeatedly retrieves the same information across multiple requests.
Examples include:
WooCommerce stores.
Membership websites.
Large content websites.
Websites with complex database queries.
Dynamic applications.
Websites with frequent logged-in activity.
However, object caching does not automatically fix inefficient queries or poorly designed application code.
If a plugin generates thousands of unnecessary cache operations, the persistent cache itself can become part of the workload.
The goal is to reduce expensive repeated operations, not simply move every operation into another storage system.
3. Redis: Persistent object caching for WordPress
Redis is an in-memory data store commonly used as a persistent object cache backend for WordPress.
It allows WordPress to store reusable application data outside the PHP request lifecycle.
Without a persistent object cache, the application may repeatedly retrieve the same information from MySQL.
With Redis configured correctly, frequently accessed values can be retrieved from Redis instead.
This can reduce database workload, particularly on websites with dynamic requests.
How Redis works with WordPress
A typical setup involves three main components:
WordPress generates a cacheable object.
The WordPress object-cache integration stores it in Redis.
A later request retrieves the value from Redis when it is still valid.
The WordPress application continues to use its normal Object Cache API.
Redis provides the persistent storage behind that API.
This means developers generally do not need to rewrite every plugin to communicate directly with Redis.
Redis does not replace page caching
This is one of the most important distinctions.
Redis is not automatically a full-page caching system.
It primarily serves as a persistent object cache backend in common WordPress configurations.
A WordPress website can therefore use:
Page caching to serve complete HTML responses.
Redis to store reusable application data.
Browser caching to reuse static files.
PHP OPcache to reuse compiled PHP bytecode.
These systems complement each other.
They do not perform the same job.
Does every WordPress website need Redis?
No.
A small business website with mostly static pages may receive excellent performance from a properly configured page cache and a good hosting environment.
Adding Redis without an identifiable need can introduce additional infrastructure, maintenance and configuration requirements.
Redis becomes more interesting when a website performs substantial dynamic processing or repeatedly accesses expensive database-derived information.
The decision should be based on measurements rather than popularity.
4. Browser caching: Let visitors reuse previously downloaded files
Not every performance problem comes from PHP or the database.
A WordPress page also contains resources such as:
Images.
CSS files.
JavaScript files.
Fonts.
Other static assets.
Without appropriate browser caching, visitors may repeatedly download resources that have not changed.
Browser caching uses HTTP caching headers to tell browsers how long certain resources can be reused.
For example, a versioned CSS file can be cached for an extended period when its URL changes whenever its contents change.
A simplified response header might look like this:
Cache-Control: public, max-age=31536000, immutableThis tells the browser that the resource can be reused for one year without revalidation.
Such a policy is appropriate only when the asset is versioned or fingerprinted so that a new URL is used when the file changes.
Applying long expiration periods to frequently changing HTML pages without a proper revalidation strategy can cause visitors to see outdated content.
Why browser caching matters
A returning visitor may already have the website’s logo, fonts, stylesheets and scripts stored locally.
Instead of downloading everything again, the browser can reuse those resources.
This reduces network requests and improves repeat-visit performance.
Browser caching is especially valuable for websites with many static assets.
5. PHP OPcache: The caching layer many WordPress owners overlook
PHP OPcache is different from page caching and object caching.
It stores compiled PHP bytecode in shared memory so PHP does not need to compile the same scripts repeatedly.
WordPress relies on PHP files from its core, plugins and themes.
Without OPcache, PHP may repeatedly spend time compiling these scripts before executing them.
With OPcache enabled, the compiled bytecode can be reused.
This reduces repeated compilation work.
Does OPcache store website pages?
No.
OPcache does not store the final HTML output of your WordPress pages.
It does not replace MySQL caching, Redis or full-page caching.
It simply makes PHP script execution more efficient by reusing compiled code.
Most modern managed WordPress hosting environments provide OPcache, although configuration and available memory can differ.
Ask your hosting provider whether OPcache is enabled and appropriately configured before attempting to install additional optimisation software.
Page Cache vs Object Cache vs Redis vs Browser Cache
Here is the practical comparison.
| Feature | Page cache | Object cache | Redis | Browser cache |
|---|---|---|---|---|
| Stores | Complete HTML | Application data | Persistent cache objects | Static resources |
| Main purpose | Avoid regenerating pages | Avoid repeated data retrieval | Persist object-cache values | Avoid repeated downloads |
| Storage | Files, memory or server cache | Usually request memory by default | Redis memory | Visitor’s browser |
| Reduces PHP work | Significantly on cache hits | Can reduce repeated application work | Can reduce repeated database work | No direct reduction in PHP execution |
| Helps logged-in users | Often limited | Yes, when configured correctly | Yes, when configured correctly | Helps static assets |
| Replaces database | No | No | No | No |
One more distinction is worth remembering: Redis is a technology that can provide persistent object caching. It is not a separate type of page cache simply because it makes a WordPress website faster.
6. How these caching layers work together
Consider a typical WordPress blog.
A visitor opens an article.
A simplified caching architecture might work like this:
First layer: Browser cache
The browser checks whether it already has reusable images, stylesheets and JavaScript files.
Second layer: CDN cache
If a CDN is configured, it may serve eligible cached content from a nearby location.
Third layer: Page cache
The server checks whether a valid HTML response already exists.
If it does, the response can be served without rebuilding the page through WordPress.
Fourth layer: WordPress application and object cache
If the page is not available in the page cache, WordPress processes the request.
The object cache may provide previously stored database-derived information.
Fifth layer: MySQL database
If the required information is not available in the object cache, WordPress may retrieve it from the database.
PHP OPcache can also reduce the cost of compiling PHP scripts throughout the PHP execution process.
This is a simplified architecture. Actual request order depends on the hosting stack, CDN, reverse proxy and WordPress configuration.
The important point is that each layer can prevent different types of repeated work.
7. How to configure WordPress caching without creating conflicts
More caching plugins do not necessarily mean better caching.
In fact, overlapping configurations can create problems.
For example, two plugins might both attempt to manage page caching, modify rewrite rules or control the same cache drop-in.
This can produce unexpected behaviour, stale content or difficult troubleshooting.
A better approach is to decide which component owns each caching layer.
Step 1: Identify your hosting environment
Before installing anything, determine:
Which web server your host uses.
Whether server-level page caching is available.
Whether Redis or Memcached is supported.
Whether PHP OPcache is enabled.
Whether your CDN already provides caching.
This avoids paying for functionality that already exists.
Step 2: Choose one primary page-cache solution
Common options include:
LiteSpeed Cache on compatible LiteSpeed/OpenLiteSpeed environments.
WP Super Cache.
W3 Total Cache.
A hosting provider’s built-in page cache.
Server-level NGINX or Varnish caching.
Do not assume that every feature of a caching plugin works on every server.
For example, LiteSpeed’s server-level caching features require the appropriate LiteSpeed infrastructure.
Step 3: Configure browser caching
Make sure static assets have suitable Cache-Control headers.
Use long caching periods for versioned assets and more cautious policies for frequently changing resources.
Step 4: Consider Redis only when appropriate
If your hosting provider supports Redis, a common integration option is the Redis Object Cache plugin.
It provides a persistent backend for the WordPress object cache.
After installation, confirm that the Redis service is available and that the object-cache integration reports a healthy connection.
Do not assume that installing the plugin alone means Redis is operational.
Step 5: Test cache behaviour
Check whether:
Public pages return cached responses.
Cache exclusions work correctly.
Logged-in sessions behave normally.
Forms continue functioning.
Shopping carts and checkout remain accurate.
Content changes invalidate or refresh the appropriate cache.
Test both first-time and repeat visits.
8. Why your WordPress cache might not be working
A caching plugin can be active while the website still performs poorly.
There are several possible reasons.
Cache bypass
Some requests intentionally bypass page caching.
Examples include requests involving logged-in users, personalised content, cart sessions or excluded URLs.
A slow logged-in dashboard does not prove that your public page cache is broken.
Cache invalidation problems
When a post is updated, its cached version may need to be refreshed.
If cache invalidation is incorrectly configured, visitors might continue seeing old content.
Incorrect exclusions
Overly broad cache exclusions can prevent important pages from being cached.
On the other hand, insufficient exclusions can expose personalised content or produce incorrect results.
Redis connection problems
A Redis integration may fail because of:
Incorrect connection details.
Missing PHP Redis support or an unavailable client.
Service outages.
Authentication errors.
Resource limits.
Configuration conflicts.
Check the plugin’s diagnostics and hosting configuration rather than repeatedly flushing the cache.
Excessive cache operations
Persistent caching is not automatically faster in every situation.
The official WP Redis documentation warns that excessive cache calls can create meaningful overhead. A poorly implemented plugin can generate so many Redis operations that the persistent cache becomes a bottleneck itself.
The number of calls, payload size, network latency and cache hit ratio all matter.
9. How to measure whether caching actually improves performance
Do not judge a caching configuration only by the score shown inside a plugin dashboard.
Measure the website before and after changing the configuration.
Useful tools include:
| Tool | What it helps measure |
|---|---|
| Google PageSpeed Insights | Real-user and laboratory performance |
| Chrome DevTools | Network requests and browser execution |
| Query Monitor | Database queries and WordPress execution |
| WebPageTest | Detailed loading behaviour |
| Redis diagnostics | Object-cache connection and activity |
| Hosting control panel | Server resource utilisation |
For more meaningful comparisons:
Record the original performance.
Test the same URL under similar conditions.
Compare cold-cache and warm-cache visits.
Compare logged-in and anonymous experiences.
Check server response timing.
Verify that dynamic features still work.
Pay particular attention to Time to First Byte, Largest Contentful Paint and Interaction to Next Paint.
A better caching setup should reduce the work associated with the relevant bottleneck. It does not guarantee that every Core Web Vital will improve.
10. Which caching setup should you choose?
The right configuration depends on the type of website.
| Website type | Recommended approach |
|---|---|
| Personal blog | Page cache, browser cache and OPcache |
| Business website | Page cache, browser cache and OPcache |
| News website | Page cache with appropriate content invalidation |
| WooCommerce store | Carefully configured page cache, object cache and selective dynamic exclusions |
| Membership website | Object cache and carefully designed page caching |
| High-traffic dynamic website | Page cache, persistent object cache, OPcache and CDN where appropriate |
Redis is worth considering when dynamic application requests repeatedly access expensive database-derived information.
It is not compulsory for every WordPress installation.
A smaller website with an effective full-page cache may gain very little from adding another caching service.
Common WordPress caching mistakes to avoid
Before finishing your caching configuration, watch for these mistakes:
Installing multiple page-cache plugins: Multiple systems managing the same layer can cause conflicts.
Assuming WP_CACHE enables Redis: The WP_CACHE constant does not automatically create a persistent object cache.
Caching personalised content incorrectly: Cart, checkout and account pages require special handling.
Ignoring cache invalidation: Visitors should receive updated content after important changes.
Flushing every cache repeatedly: Cache clearing is useful for troubleshooting, not a permanent optimisation strategy.
Installing Redis without checking hosting support: Redis requires an accessible Redis service and compatible integration.
Ignoring browser caching: Optimising server responses while repeatedly downloading large static resources leaves another performance opportunity untouched.
Final thoughts: Stop asking which caching plugin is fastest
The more useful question is which part of your WordPress website is doing unnecessary work.
If your website repeatedly generates the same HTML, page caching may provide the biggest improvement.
If dynamic requests repeatedly retrieve expensive database information, persistent object caching may help.
If visitors repeatedly download unchanged assets, browser caching deserves attention.
If PHP spends unnecessary time compiling scripts, OPcache is relevant.
Redis is valuable when it solves a real object-caching problem, not simply because it is popular among hosting professionals.
A properly configured WordPress website does not need every available caching technology. It needs the right combination of caching layers, correctly configured around the way the website actually operates.
Understand the workload first. Choose the caching layer second.
About the author: Jabbar Khan is a Full Stack Developer, WordPress Developer and Digital Marketing Professional. He shares practical insights about WordPress development, website performance, hosting, SEO and digital growth at JabbarKhan.com.