How to Configure Redis Object Cache in WordPress (LSCache)

Verified Knowledge
Database Savior: Without object caching, WordPress executes the exact same identical MySQL queries thousands of times a minute. Redis intercepts these queries and serves them instantly from RAM.
Page Cache vs Object Cache
You've likely installed a caching plugin before. Plugins like WP Rocket or LiteSpeed Cache provide Page Caching—meaning they take the final HTML output of a webpage and save it. However, page caching is bypassed when:
- A user is logged in.
- A customer is checking out on WooCommerce.
- The cart widget needs dynamic updating.
When Page Caching is bypassed, WordPress slams your Database. That's where Object Caching (Redis) comes in.
Step 1: Install the Redis Server
If you are on an Unmanaged VPS (Ubuntu 22/24), you must install the Redis server application first.
sudo apt update
sudo apt install redis-server -y
Enable Redis to start on boot:
sudo systemctl enable redis-server
sudo systemctl start redis-server
(Note: If you use AmanaFlow cPanel/CyberPanel hosting, Redis is usually pre-installed and available with 1-click).
Step 2: Configure Redis Memory (Optional but Recommended)
By default, Redis might consume all your RAM if not limited. Edit /etc/redis/redis.conf:
maxmemory 256mb
maxmemory-policy allkeys-lru
Restart Redis after applying.
Step 3: Connect WordPress via LiteSpeed Cache
We highly recommend using the free LiteSpeed Cache (LSCache) plugin over the default "Redis Object Cache" plugin for better server-level integration.
- In your WordPress Dashboard, go to LiteSpeed Cache > Cache > Object.
- Turn Object Cache to
ON. - Method:
Redis. - Host:
127.0.0.1 - Port:
6379 - Click Save Changes.
Refresh the page. You should now see a green "Connection Test: Passed" message.
Need Enterprise Redis Caching?
Every AmanaFlow WordPress Hosting plan includes dedicated Redis containers to ensure lightning-fast database performance.
Measuring the Impact
After enabling Redis on a standard WooCommerce store:
- Admin Dashboard Speed: Product catalog loads will decrease from ~2 seconds to ~300ms.
- CPU Usage: Server CPU loads will drop significantly because MySQL is handling 80% fewer repetitive queries.
FAQs
Q: Can I share one Redis instance across multiple WordPress sites?
A: Yes, but you MUST assign a different Global Group or Site ID prefix in the LiteSpeed Cache settings for each website. Otherwise, users will see data belonging to other websites!
More from Wordpress Excellence
View Category
The Best WordPress Security Plugins for 2026: A Definitive Guide
Stop relying on basic passwords. Learn how to harden your WordPress core with the top security audit, firewall, and malware scanning plugins.

How to Recover a Hacked WordPress Website (Emergency Protocol)
Are there Japanese characters in your Google search results? Is your site redirecting to crypto scams? Read this step-by-step malware recovery guide.