On Cloudways Autonomous, WordPress applications can use advanced object caching to improve performance.
Cloudways provides Object Cache Pro, a premium Redis-powered object caching plugin at no extra cost (worth $100), that caches database queries and object data in memory for faster page loads.
Traditionally, Object Cache Pro uses the PHP Redis (PhpRedis) extension as the Redis client, handling all cache operations over the network.
While PhpRedis is effective, it has some limitations in high-traffic scenarios. This article introduces Relay, a modern, high-performance PHP extension for Redis, and explains its benefits over PhpRedis.
We’ll also guide you through switching your Cloudways Autonomous application’s object cache backend from PHP Redis to Relay (and vice versa) with step-by-step instructions.
Table of Contents:
What is Object Cache Pro?
Object Cache Pro is a premium WordPress caching plugin (integrated on Cloudways) that uses Redis to store query results and object data in memory.
By caching frequent database queries, it offloads work from your MySQL database and serves repeated requests much faster.
On Cloudways Autonomous, Object Cache Pro comes pre-installed on supported WordPress applications, ready to improve performance for dynamic sites like WooCommerce stores and LMS, and make them faster.
What is PHP Redis (PhpRedis)?
PhpRedis is the standard PHP extension (client library) for connecting PHP applications (like WordPress) to Redis.
It sends and receives data to a Redis server over the network, enabling object caching plugins (such as Object Cache Pro) to store and retrieve cached data.
In Cloudways’ default configuration, Object Cache Pro uses PhpRedis to interact with the Redis service.
While PhpRedis is widely used and stable, it relies on network calls for every cache operation, which can introduce latency.
Limitations of PhpRedis
Network latency for every get/set request
Redis I/O bottlenecks under high traffic
No local in-memory caching in PHP
These limitations highlight why an alternative approach like Relay can be beneficial for demanding WordPress sites.
What is Relay?
Relay is a modern PHP extension that combines the functions of a Redis client with an in-process shared memory cache.
In simpler terms, Relay not only talks to the Redis server (like PhpRedis does) but also keeps a local copy of frequently accessed cache data in the PHP application’s memory.
By doing so, Relay drastically reduces the number of network calls to Redis for cache hits, since PHP can retrieve data from its own memory at lightning speed.
Object Cache Pro supports Relay natively, meaning it can use Relay as a drop-in replacement for PhpRedis with minimal configuration.
How Relay Works?
When WordPress requests cached data, Relay will serve the data from the local in-memory cache if available (cache hit), avoiding a network trip to Redis.
If the data isn’t in local memory (cache miss), Relay will fetch it from Redis, return it to WordPress, and also store it in the shared memory pool for faster access next time.
This hybrid approach yields significant performance gains while still keeping Redis as the authoritative datastore.
Benefits of Relay
Faster response times (up to 8×)
Higher cache hit ratio
Reduced Redis load
More stable memory usage
Higher throughput under load
Relay unlocks in-memory caching at the application level, which translates into faster and more efficient WordPress performance, especially under heavy load. It is ideal for sites where every millisecond of latency matters.
Ideal Use Cases for Relay
High-Traffic Websites: News sites, viral blogs, or any site with traffic spikes.
Large WooCommerce Stores: Extensive catalogs, many shoppers, frequent cart/inventory queries.
Dynamic Sites with Heavy Query Load: Complex filtering, search, and personalized content.
API-Driven / Headless WordPress: Faster API responses for JS frontends and mobile apps.
Membership or LMS Platforms: Online courses, forums, and communities with repeated user lookups.
Performance-Focused Hosting Stacks: Works best in optimized environments (like Cloudways Autonomous), where Relay can replace PhpRedis for lower latency and better memory handling.
How to Switch to Relay on Cloudways Autonomous:
To switch to Relay for Cloudways Autonomous applications created before September 30th, 2025 you need to contact Cloudways’ support team as they would need to make an update to the wp-config.php file.
All websites/applications created after September 30th, 2025 come with Relay by default.
How to Switch to PHPRedis:
If you wish to switch to PHPRedis after being on Relay you can easily proceed within a few steps.
Step #1 – Navigate to Performance Tab
In your application, go to the Performance tab in Cloudways Autonomous.
Under Object Cache Pro, click the Relay option to view available extensions.
Step #2 – Choose PHP Redis:
You’ll see the Switch Cache Extension popup.
Select PHP Redis as your caching extension.
Step #3 – Switch Extension:
Simply click “Switch Extension” and your application will seamlessly be switched to Relay.
Now, follow the steps below to configure the application.
Conclusion
Relay is a powerful improvement for WordPress object caching on Cloudways, offering substantial performance improvements by leveraging in-memory caching within PHP.
By understanding the differences between PHP Redis and Relay and following the steps above, you can confidently switch to the option that best suits your site’s needs.
For high-traffic and dynamic sites, Relay can provide faster responses and reduce server load, whereas PHP Redis remains a reliable general-purpose choice.
That's it! We hope this article was helpful.
Need Help?
If you need assistance, feel free to:
Visit the Cloudways Support Center
Chat with us: Need a Hand > Send us a Message
Or create a support ticket anytime.
We're here 24/7 to help you!
