OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: RamSense on May 19, 2021, 08:25:03 am

Title: redis - wordpress
Post by: RamSense on May 19, 2021, 08:25:03 am
I just saw the plugin redis and found some promising speeding info when used with Wordpress.
I run Wordpress on my local NAS and would like to use Redis plugin to opnsense-redis.
Is this possible?
I added in the wp-config.php:
define('WP_REDIS_HOST', '127.0.0.1');
define('WP_REDIS_PORT', '6379');

but redis plugin in Wordpress gives this error:

Client:
Drop-in: Valid
Disabled: No
Ping:
Connection Exception: Connection refused [tcp://127.0.0.1:6379] (Predis\Connection\ConnectionException)
Errors: [
    "Connection refused [tcp:\/\/127.0.0.1:6379]"
]

what am I missing?
Title: Re: redis - wordpress
Post by: Patrick M. Hausen on May 19, 2021, 09:23:27 pm
I just saw the plugin redis and found some promising speeding info when used with Wordpress.
I run Wordpress on my local NAS and would like to use Redis plugin to opnsense-redis.
Is this possible?
I added in the wp-config.php:
define('WP_REDIS_HOST', '127.0.0.1');
define('WP_REDIS_PORT', '6379');

but redis plugin in Wordpress gives this error:
[...]

what am I missing?

127.0.0.1 is the "localhost" address. So you are directing your Wordpress at a redis server on the Wordpress host. You would need to replace the IP address with the one on your OPNsense.

But ...

I dare say that is a bad idea. The point of a redis cache for any CMS is to run on the same machine as the CMS. That's why 127.0.0.1 is the default. You should install redis in the same environment as your Wordpress, not on your firewall.

What NAS are you running? Of what kind is that Wordpress "thing" - VM, Docker container, FreeBSD jail?

HTH,
Patrick
Title: Re: redis - wordpress
Post by: RamSense on May 20, 2021, 08:28:11 am
Hi Patrick,

Thnx for explaining. I had tried the ip of Opnsense also, what resulted in timeout. But I follow your explanation and will go for trying to run it on Synology nas to see how that goes :-).
Keeping the firewall by its main and only task.

Title: Re: redis - wordpress
Post by: dawngleic on November 02, 2021, 11:10:36 am
I would suggest doing the same as Patrick proposes because it definitely won't work if you install it on your firewall. Let me know if you solved the issue. If not, I can try to do that for you. By the way, this is a kind of an unrelated question, but let me ask it anyway. So, the organization I work for is looking to incorporate an intranet into the day-to-day operations. They appointed me in charge of finding a suitable one, so I was thinking of choosing Wordpress as intranet (https://prosvit.design/wordpress-intranet/) . Has anyone used it? If yes, opinions?
Title: Re: redis - wordpress
Post by: fabian on November 02, 2021, 06:33:31 pm
The Redis plugin is used for internal caching by services that need that cache.
One example would be rspamd. Another one is ntopng.