Control Web Panel

WebPanel => PHP Selector => Topic started by: ted81das on January 05, 2024, 04:18:41 AM

Title: Redis Memcache with PHP-FPM Varnish
Post by: ted81das 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.
Title: Re: Redis Memcache with PHP-FPM Varnish
Post by: Netino 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
Title: Re: Redis Memcache with PHP-FPM Varnish
Post by: seascoot 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:

(https://snap.ashampoo.com/uploads/2025-03-12/dkWTcIyHCjjbft6MeIhPZoBVDOdm2GhBUhAfxJS4BtsYOuwZLaEZvpwexbTVKkm2.png)

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.



Title: Re: Redis Memcache with PHP-FPM Varnish
Post by: overseer on March 13, 2025, 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/ (https://blog.alphagnu.com/speedup-wordpress-decrease-server-load-redis-cache-cwp-centos-webpanel/)
Title: Re: Redis Memcache with PHP-FPM Varnish
Post by: Starburst on March 13, 2025, 01:33:59 AM
@ted81das

What distro are you are you running CWP on?

Public or NAT?