There was a problem loading the comments.

How to enable redis cache for WordPress

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
In this guide we will guide you how to enable redis cache for WordPress.

What is Redis?

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

In summary, Redis cache will make your site load faster and normally less than 1 second.

How to enable redis cache for WordPress

There are 2 parts:
  1. Firstly, you have to enable PHP redis to allow PHP speak and interactive with Redis cache
  2. Secondly, enable redis under WordPress admin.

1/ How to enable PHP Redis cache in cPanel?
  • Login to your cPanel control panel
  • Search for PHP selector
  • Navigate to Extensions and tick on Redis

f262f1fa0988bd185170532045ea00ddb0a159b3?t=19e56b00419ff1a61639a160826bd2e4




2/ How to enable redis under WordPress admin
  1. In this part we will use LiteSpeed cache plugin to enable object cache for WordPress. LiteSpeed cache (called lscache) is the fastest plugin for WordPress today.
  2. To enable lscache plugin, please follow this guide: how to enable LiteSpeed Cache for WordPress
  3. Then navigate to Settings -> LiteSpeed Cache -> Object and configure setting parameter as below
  • Object Cache: on
  • Method: Redis
  • Host: 127.0.0.1
  • Port: 3344
  • Hit save

b52880b5ec03ecb81309b2a1bb5bb0ce9d6ce065?t=e8a49459f8ad2d032bf58a91d61e4ddd

If Connection Test show Passed mean you have configure redis for WordPress successful.


Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

Captcha
© CenterHop