Author Topic: Redis Memcache with PHP-FPM Varnish  (Read 1134 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Redis Memcache with PHP-FPM Varnish
« on: January 05, 2024, 04:18:41 AM »
Hi - I am on CWP 7 (NGINX/Apache/PHP-FPM/Varnish) I have enabled redis and memcache toggle for both php and php-fpm selectors (php 8.1). The toggle informtaion shows that redis server will be downloaded and installed. In earlier versions it used to be save and build but in my version it just shows save. After saving, when i go to the domain wordpress which is under php 8.1, and try using redis plugin it is not detecting redis.

It is showing below errors:
========================
 
Redis is unreachable: Connection refused [tcp://127.0.0.1:6379]
Status:    Not enabled
Filesystem:    Writeable
Redis:    Unreachable
Status: Not enabled
Client:
Drop-in: Not installed
Disabled: No
PhpRedis: Not loaded
Relay: Not loaded
Predis: 2.1.2
Credis: Not loaded
PHP Version: 8.1.20
Plugin Version: 2.5.0
Redis Version: Unknown
Multisite: No
Metrics: Disabled
Metrics recorded: 0
Filesystem: Writable
WP_REDIS_PLUGIN_PATH: "/home/edgeho83/public_html/blog3/wp-content/plugins/redis-cache"
Drop-ins: []


In SSH shell it is not showing Redis as enabled.

What am i missing.

Offline
***
Re: Redis Memcache with PHP-FPM Varnish
« Reply #1 on: January 05, 2024, 07:25:58 PM »
If somehow the redis server was installed, it may not have been activated.
Try:
Code: [Select]
# systemctl start redis


If it was enabled, you may have installed redis on another port, other than the default port 6379.
Check with:
Code: [Select]
# netstat -tupln | grep redis-server...and check if it is up and responding on port 6379.

Regards,
Netino

Offline
*
Re: Redis Memcache with PHP-FPM Varnish
« Reply #2 on: March 12, 2025, 05:28:52 PM »
I'm late to the game on this one, but in case you have this same issue here is one solution.

As stated by @ted81das redis server does not get installed when using PHP-FPM Selector.  However, if you go to PHP Version Switcher under the PHP Settings menu it is possible to do it from there.  You will see this warning:



That warning suggests that you should not use PHP Version Switcher.  However, if you don't care that redis get activated on your "default" PHP version, you can get the server installed from there.  Just go to the "Manage Options" button and add redis from there.  On saving, that PHP version will be rebuilt along with redis server installation for the rest of the system.




Offline
*****
Re: Redis Memcache with PHP-FPM Varnish
« Reply #3 on: Today at 12:45:11 AM »
Since WordPress is only fully compatible with php 7.4 and mostly compatible with 8.1, I elected to enable redis under php-fpm 7.4.
https://blog.alphagnu.com/speedup-wordpress-decrease-server-load-redis-cache-cwp-centos-webpanel/

Offline
*****
Re: Redis Memcache with PHP-FPM Varnish
« Reply #4 on: Today at 01:33:59 AM »
@ted81das

What distro are you are you running CWP on?

Public or NAT?