By Edy, Tech Expert & Blogger
If you’re setting up Redis object cache on your WordPress site and using Cloudflare, you might run into a confusing error:
“Error establishing a Redis connection: WRONGPASS invalid username-password pair or user is disabled.”
This issue can appear even if your credentials are correct, Redis is reachable, and your configuration in wp-config.php looks perfect. I encountered this firsthand while configuring Redis object cache on a VPS with xCloud, and the root cause turned out to be Cloudflare’s proxy feature.

What Is Redis Object Cache?
Redis Object Cache speeds up WordPress websites by storing frequently accessed data, like database queries and API responses, in memory instead of constantly querying the database. Redis is an in-memory key-value store, and when used as an object cache, it helps reduce server load and improve page load times.
WordPress typically enables this through a plugin like Redis Object Cache, which stores transients, query results, and other internal objects in Redis. It’s especially useful for dynamic sites running on VPS or cloud infrastructure without built-in caching layers.

The Problem: Redis Object Cache Fails with Cloudflare Proxy Enabled
Setting your A record in Cloudflare to Proxied (orange cloud) before completing your server setup can interfere with how your site communicates with Redis. Specifically, WordPress Redis plugins like Redis Object Cache rely on direct server-to-server communication — something Cloudflare’s reverse proxy setup can block or alter.

At the same time, Let’s Encrypt SSL certificates (which many setups rely on) may also fail to issue properly if Cloudflare is too early between your server and the Internet.
Cloudflare proxy vs DNS-only mode
Why This Happens
Here’s a breakdown of what’s going on:
- Cloudflare hides the real IP: Your origin server no longer sees the client IP — it sees Cloudflare instead. This can confuse Redis ACL or firewall rules that expect localhost or a specific IP.
- Redis ports are not proxied: Cloudflare does not proxy Redis TCP ports, only standard HTTP/HTTPS traffic.
- Let’s Encrypt may fail: If you’re using HTTP-01 challenge for SSL, Cloudflare’s caching or redirect rules can block or delay the validation request.
- Authentication errors: Even if you pass a correct username and password to Redis, Cloudflare’s proxy can result in a dropped or misrouted request, triggering “WRONGPASS” or timeout errors.
How to Fix It (configure Redis simple Step-by-Step)
Here’s the right order of operations to avoid a Redis object cache error with Cloudflare:
Disable Cloudflare Proxy
Set the A record for your domain to “DNS Only” (gray cloud).
Install Redis and configure it on your server
- Install the Redis Object Cache plugin for WordPress.
See the screenshot of the plugin above - Make sure Redis is reachable locally (127.0.0.1)
- Use the correct wp-config.php setup:
define(‘WP_REDIS_HOST’, ‘127.0.0.1’);
define(‘WP_REDIS_PORT’, 6379);
define(‘WP_REDIS_TIMEOUT’, 1);
define(‘WP_REDIS_READ_TIMEOUT’, 1);
define(‘WP_REDIS_DATABASE’, 0);
// Redis ACL user/password as array
define(‘WP_REDIS_PASSWORD’, [‘u1_xcloud’, ‘your_secure_password_here’]);
define(‘WP_REDIS_DISABLE_BANNERS’, true);
define(‘WP_REDIS_PREFIX’, ‘redis:33988:135064:xcloud-edywerder-ch’);
define(‘WP_CACHE’, true); - This ACL array format is supported by the Redis Object Cache plugin by Till Krüss.
Enable the Redis Object Cache Plugin
- Tools, Redis, and click “Enable Object Cache.”
- Install your SSL certificate while Cloudflare is still in DNS-only mode. This will prevent Cloudflare from blocking Let’s Encrypt validation.
- Once Redis and SSL work, you can switch your A record back to Proxied (orange cloud) for CDN and security benefits.
Below is a screenshot showing when Redis is activated

Final Thoughts
Redis caching is a powerful way to speed up WordPress, especially on VPS or cloud servers. But when paired with Cloudflare, timing matters. Proxying too early can break Redis authentication, block SSL issuance, and leave you chasing errors that aren’t really misconfigurations — they’re just order-of-operation problems.
Tip: If Redis breaks your site after enabling object caching, just delete in wp-content/object-cache.php to disable it and restore access.
I learned this the hard way — now you don’t have to.
I would love to get some feedback from you. Was this article helpful? Please share your opinion with me in the comment section below. Or, if you prefer a more personal touch, feel free to email me directly at info@edywerder.ch. Your thoughts and insights are always appreciated. Additionally, you can connect with me on Reddit at Navigatetech.
Tech Expert & Blogger
Hi, I’m Edy. With over 30 years of experience in the IT industry, I’ve tackled numerous tech challenges.
As a solopreneur, I write articles to fill the gaps I notice in my work and online.
My mission? To provide clear, step-by-step tech guidance and improve the information you find on the web
Enjoying the content?