Configuring Redis Object caching for WordPress with LScache on Cyberpanel

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,

1 Like

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

Hi Jayw,

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

Regards.

Hi,

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

Hi,

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

Thanks Jayw

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?

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.

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

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

thanks

I’ve not done any benchmarks but you can find some here: https://community.centminmod.com/threads/how-to-install-redis-server-on-centmin-mod-lemp-stack.4546/

I do use it on production, the server is never strained. Hard to estimate how many visitors it could handle but I’d guess thousands. (8gb Vultr server)

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?

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:

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

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