Skip to main content

Redis Object Caching

What is it? Simplifed

Think of your WordPress directory like a busy restaurant:

  • WP Rocket is the Pre-cooked Buffet (Page Caching)

    When a customer (visitor) visits a standard page like your Homepage or About page, WP Rocket hands them a fully prepared meal right away. It saves the final, pre-built HTML page so your server doesn’t have to cook (run code) every single time someone visits.

  • Redis Object Cache is the Prep Cook in the Kitchen (Database Caching)

    When a visitor uses your live search bar, they are ordering a custom dish (e.g., searching for “chinese food”). WP Rocket can’t pre-cook every possible custom search, so the order has to go back to the kitchen (your database). Redis acts as a fast prep cook that keeps chopped ingredients (frequently requested database results) sitting in super-fast RAM, so the kitchen can whip up those custom search results in a fraction of a second.

Comparison Breakdown

Feature WP Rocket (Page Cache) Redis (Object Cache)
What it caches Whole HTML pages, CSS, & JavaScript files. Individual database queries and raw data.
Where it lives Saved as static files on your web server. Saved directly in your server’s ultra-fast RAM memory.
Best for Static pages (Homepage, Contact Us, Blog posts). Dynamic features (Live directory searches, filters, login dashboards).
What happens on search Bypassed (because every search is custom). Speeds it up (fetches matching listings instantly from RAM).

 

 

How to set it up

On Cpanel

  • Search “Redis” and turn it on
  • Updated wp-config with the following:

define( ‘WP_REDIS_SCHEME’, ‘unix’ );
define( ‘WP_REDIS_PATH’, ‘/home/parknca1/tmp/redis.sock’ );

 

*Hosting Nation uses Litespeed so this setup works for it. Other set ups might have different instructions.

On WordPress

  • Add plugin: Redis Object Cache
  • Go to settings and refresh to make sure it connected. It might take a minute or two.
  • Once connected, clear cache in WP Rocket.
  • Check front-end and test search functionality to ensure it all works.