WordPress object cache on shared hosting: Redis, Memcached & real expectations (India)
By HostStack Editorial · · All posts
Every WordPress performance tutorial mentions Redis or Memcached. Most don't explain what object caching actually does, when you need it, and — critically — whether your hosting even supports it. Here is the honest guide for Indian WordPress site owners.
What WordPress object caching actually fixes
Every WordPress page request involves dozens of MySQL queries: menu items, widget data, options table lookups, user permissions, WooCommerce product variations, and custom field values. Without object caching, these are rebuilt from scratch on every single request.
Object caching stores the PHP objects representing these results in memory. Subsequent requests retrieve them from memory (microseconds) instead of querying MySQL (milliseconds). The savings are most dramatic on:
- WooCommerce stores (complex product queries, cart session data)
- Membership sites with lots of per-user data
- Sites with complex navigation menus built from many CPTs
- High-traffic blogs with many widget areas
For a simple 10-page brochure site with a Yoast SEO plugin and basic theme — object caching makes almost no measurable difference.
Object cache vs page cache — know the difference
| Feature | Page Cache | Object Cache |
|---|---|---|
| What it stores | Complete HTML page | PHP objects from DB queries |
| Bypasses PHP? | Yes — serves HTML directly | No — PHP still runs |
| Helps logged-in users? | No — cache bypassed for logged-in | Yes — major benefit |
| Requires Redis? | No (works with files) | Yes for persistent cache |
For anonymous visitors, page caching (WP Rocket, W3 Total Cache, LiteSpeed Cache) gives a bigger win. For WooCommerce checkouts and logged-in members, object caching adds another layer of speed.
Redis vs Memcached — which to choose
Both can back WordPress's object cache, but Redis is the better choice in 2026:
- Redis: Supports persistence (survives server restart), richer data types, more widely supported by the WordPress Redis Object Cache plugin
- Memcached: Simpler, slightly faster in pure benchmarks, but no persistence and fewer WordPress plugins support it well
Recommendation: use Redis unless your hosting only offers Memcached.
Can you use Redis on shared hosting in India?
Almost never. Redis requires a persistent background process (daemon) running on the server. Shared hosting restricts persistent processes per account — it would let any account consume unlimited memory. Most Indian shared hosts, including HostStack shared plans, do not include Redis.
On HostStack VPS plans, you have root access and can install Redis yourself: apt install redis-server, then install the Redis Object Cache WordPress plugin and connect it to 127.0.0.1:6379. Takes about 10 minutes. The WooCommerce checkout performance guide covers the full VPS Redis setup.
How to measure the actual gain
Don't benchmark with PageSpeed Insights — it tests anonymous traffic from a US server, which uses page cache anyway. Measure what object caching actually affects:
- Install Query Monitor plugin → check "Queries" tab while logged into WP Admin
- Note the number of queries and total query time before Redis
- Enable Redis Object Cache → check again
- Compare: a good result shows 40–70% fewer queries on repeat page loads
Also monitor Google Search Console Core Web Vitals field data for the pages with the most WooCommerce or member activity — these will show the real-world LCP and INP improvement over 28-day rolling windows.
Frequently asked questions
Does WordPress on shared hosting support Redis in India?
Most shared hosting plans do not include Redis as it requires a persistent background process. Redis object caching is available on HostStack VPS plans where you can install it yourself.
What is the difference between object cache and page cache?
Page cache stores rendered HTML and serves it without running PHP — great for anonymous visitors. Object cache stores PHP objects to reduce database queries — it helps most for WooCommerce checkouts and logged-in users who bypass page cache.
How do I install Redis on a HostStack VPS for WordPress?
SSH in and run: apt install redis-server, then systemctl enable redis and systemctl start redis. Install the Redis Object Cache plugin in WordPress, connect to 127.0.0.1:6379, and enable the object cache in the plugin settings.