CyberPanel Community

Configuring Redis Object caching for WordPress with LScache on Cyberpanel

Ka
Kartickay #1

Hi Support,

Is their any documentation link to configure Redis Object caching for WordPress with LScache deployed using Cyberpanel.

I was looking at this article " Admin | LSCache for WordPress | LiteSpeed Documentation " but would like to know any documentation from cyberpanel team.

Regards,

12 replies
ja
jayw #2

I set it up very easily.

  1. Ensure Redis is up and running
  2. Enable Redis via the WordPress plugin, only setting I had to change was password because I use requirepass

Additionally, I’d recommend these settings in redis.conf:

maxmemory 100mb
maxmemory-policy allkeys-lru
maxmemory-samples 10
appendonly yes

and disable snapshotting, comment out the lines beginning with “save” to do this, for example,

#save 900 1
#save 300 10
#save 60 10000

I’d also add vm.overcommit_memory = 1 to /etc/sysctl.conf.

Also disable transparent huge pages,
echo never > /sys/kernel/mm/transparent_hugepage/enabled

Ka
Kartickay #3

Hi Jayw,

Thanks for the detailed reply I will try this out, also can these settings be used for Woocommerce sites.

Regards.

ja
jayw #4

Hi,

Yes, these are good settings for any kind of site.

Ka
Kartickay #5
Hi,

Yes, these are good settings for any kind of site.

Thanks Jayw

em
emoticonizer #6
I set it up very easily.
  1. Ensure Redis is up and running
  2. Enable Redis via the WordPress plugin, only setting I had to change was password because I use requirepass

Additionally, I’d recommend these settings in redis.conf:

maxmemory 100mb
maxmemory-policy allkeys-lru
maxmemory-samples 10
appendonly yes

and disable snapshotting, comment out the lines beginning with “save” to do this, for example,

#save 900 1
#save 300 10
#save 60 10000

I’d also add vm.overcommit_memory = 1 to /etc/sysctl.conf.

Also disable transparent huge pages,
echo never > /sys/kernel/mm/transparent_hugepage/enabled

thanks. Can Redis be enabled together with LSCache? Is there any conflict?

ja
jayw #7
thanks. Can Redis be enabled together with LSCache? Is there any conflict?

I use both together with no issue.
If you are using the WordPress LSCache plugin, Redis is fully supported and can be enabled in the advanced menu options.

em
emoticonizer #8
thanks. Can Redis be enabled together with LSCache? Is there any conflict?

I use both together with no issue.
If you are using the WordPress LSCache plugin, Redis is fully supported and can be enabled in the advanced menu options.

Sweet! Any benchmark for this setup? Do you use it on a production website? how many visitors can it handle?

thanks

in
inspiredearth #10

Type your comment> @jayw said:

(Quote)
I use both together with no issue.
If you are using the WordPress LSCache plugin, Redis is fully supported and can be enabled in the advanced menu options.

On LiteSpeedCache plug-in, Is it necessary to put in Redis Database ID number?
This is on a server with multiple Wordpress sites on it. Do they each have their own Redis Database ID number?
Or can that be ignored?

sl
slimx #11

Type your comment> @inspiredearth said:

Type your comment> @jayw said:

(Quote)
I use both together with no issue.
If you are using the WordPress LSCache plugin, Redis is fully supported and can be enabled in the advanced menu options.

On LiteSpeedCache plug-in, Is it necessary to put in Redis Database ID number?
This is on a server with multiple Wordpress sites on it. Do they each have their own Redis Database ID number?
Or can that be ignored?

No, it’s not. Ignore it. :slight_smile:

FV
Febryan Valdo #12

Hello,

Can i use Redis Object Cache plugin by Till Krüss instead of Redis Cache built in LSCache Plugin?

And where do i change the redis.conf is it on /etc/redis/redis.conf? if so how can i change it? just by adding a new line?

maxmemory 100mb
maxmemory-policy allkeys-lru
maxmemory-samples 10
appendonly yes

and comment out

#save 900 1
#save 300 10
#save 60 10000

Best regards
Febryan Valdo

jo
josephgodwinke #13

Hello @FebryanValdo you need to follow the instructions GitHub - rhubarbgroup/redis-cache: A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI. and GitHub - rhubarbgroup/redis-cache: A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.

Redis configuration is here /etc/redis/redis.conf
Redis unix socket path is /var/run/redis/redis-server.sock

I highly advice you set a password for your installation

Sign in to reply