• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

[Request] Redis object cache pro wordpress plugin

Hi my friend @miyojin
One more thing came up, see if you can help me:



1º - Do you know how to use this session correctly?
Code:
'database' => 0, // change for each site
I have several clients on a server with whm, cpanel.

I installed this on some wordpress sites, but this was happening:
When trying to access the PANEL - DASHBOARD of a SITE, I was directed to the other site.

The 2 sites using this plugin.



2º - Redis configuration server
Do I need to make any extra adjustments to speed this up?

I just increased the redis memory.



Thank you so much again.

The reason you're experiencing the redirection issue is that the site is using the Redis cache information to forward you to the primary site it is connected to (the first site). To bypass that you need to create a separate connect per website, so that Redis can differentiate.

To do that you'll want to update the WP-Config file for each of the sites you're running with the following:

define( 'WP_REDIS_PREFIX', 'example' );
define( 'WP_REDIS_SELECTIVE_FLUSH', true);

Replace “example” with something unique for each site.
 
The reason you're experiencing the redirection issue is that the site is using the Redis cache information to forward you to the primary site it is connected to (the first site). To bypass that you need to create a separate connect per website, so that Redis can differentiate.

To do that you'll want to update the WP-Config file for each of the sites you're running with the following:

define( 'WP_REDIS_PREFIX', 'example' );
define( 'WP_REDIS_SELECTIVE_FLUSH', true);

Replace “example” with something unique for each site.

Thank you so much for that my friend.
 
  • Like
Reactions: branljohns
so complete code for wp-config.php would be like below?

Code:
define('WP_REDIS_CONFIG', [
'token' => 'vYgPURcKzmz7M9TxUP4uYVG1l0mb1bu3JkaDTSQGzHezUWZfNyeGSmu0LK8E', // 60 chars random string
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0, // change for each site
'timeout' => 1,
'read_timeout' => 0.5,
'async_flush' => true,
'split_alloptions' => true,
'prefetch' => true,
'debug' => false,
'save_commands' => false,
]);

define('WP_REDIS_DISABLED', getenv('WP_REDIS_DISABLED') ?: false);
define( 'WP_REDIS_PREFIX', 'domain' );
define( 'WP_REDIS_SELECTIVE_FLUSH', true);

Guys thanks for great plugin, you all are really awesome (y)
 
invalid access token :(
should be 60 chars random string, working fine on my server, i just changed few characters in string and done, i think you are using same string that is posted here,
 
Last edited:
invalid access token :(

Honestly, the token isn't required. It's only necessary for access to updates. You can simply not supply it and the plugin will function perfectly well, but if you do add an access token it needs to be exactly 60 random alphanumeric characters. If it's less or more, the plugin won't work.
 
@branljohns please can you help me for multisite setup?
'database' => 0, // change for each site
is it necessary to change database for every website? if yes then how to select a database?
in below code can i change 'example' with 'domain' ?
define( 'WP_REDIS_PREFIX', 'example' );
i copy config entries as mentioned in this thread, but when i check official log they are also recommending use
'maxttl'
should we use that also?

any help will be really appreciated
 
"Your Redis Cache Pro license has expired, and the object cache will be disabled. Per the license agreement, you must uninstall the plugin."
on Multisite plugin page.
The plugin works, but this dosen t go away!
 
"Your Redis Cache Pro license has expired, and the object cache will be disabled. Per the license agreement, you must uninstall the plugin."
on Multisite plugin page.
The plugin works, but this dosen t go away!
If the plugin works leave it there what's problem.
 
@branljohns please can you help me for multisite setup?
'database' => 0, // change for each site
is it necessary to change database for every website? if yes then how to select a database?
in below code can i change 'example' with 'domain' ?
define( 'WP_REDIS_PREFIX', 'example' );
i copy config entries as mentioned in this thread, but when i check official log they are also recommending use
'maxttl'
should we use that also?

any help will be really appreciated

No, it's not necessary to make any changes to the REDIS DB for multisite, as there's only one cache being created, there's nothing for it to compete with. So, adding the WP_REDIS_PREFIX constant is unnecessary.

MAXTTL is a definite. You should use it. It simply tells REDIS how often to invalidate its cache. This way you don't have to do so manually all the time. You should enter it in seconds. You can also use a formula to calculate it - i.e. 60*60*24*7 (that is 60 seconds x 60 minutes x 24 hours x 7 Days) is the same as 604800 (total number of seconds in the prior calculation).

There's really nothing else beyond what is already listed in this thread that absolutely needs to be added, but you should look at their documentation and see if anything else feels meaningful for your specific setup.

 
No, it's not necessary to make any changes to the REDIS DB for multisite, as there's only one cache being created, there's nothing for it to compete with. So, adding the WP_REDIS_PREFIX constant is unnecessary.

MAXTTL is a definite. You should use it. It simply tells REDIS how often to invalidate its cache. This way you don't have to do so manually all the time. You should enter it in seconds. You can also use a formula to calculate it - i.e. 60*60*24*7 (that is 60 seconds x 60 minutes x 24 hours x 7 Days) is the same as 604800 (total number of seconds in the prior calculation).

There's really nothing else beyond what is already listed in this thread that absolutely needs to be added, but you should look at their documentation and see if anything else feels meaningful for your specific setup.



Hello,

Need help, and here is the info on my MULTISITE with subdirectory site, and here is what I used in wp-config by following their official suggestion at https://objectcache.pro/docs/installation/


/* Redis 配置 */
define('WP_REDIS_CONFIG', [
'token' => '79XegEAnob46AlUoMtM6FwCpmAAjCPhmlPzY52cFE6IYHYxsEdjFJ6QbJ98A',
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0, // change for each site
'maxttl' => 86400 * 7,
'timeout' => 1.0,
'read_timeout' => 1.0,
'split_alloptions' => true,
'debug' => false,
]);

define('WP_REDIS_DISABLED', false);



/* That's all, stop editing! Happy publishing. */



here is the screenshot:

screnshot.png


As screenshot show:

The Redis Cache Pro license token is invalid and plugin updates have been disabled


  • Status: Not connected
  • Drop-in: Valid
  • License: Invalid


An object cache error has occurred:
  • Failed to initialize object cache: Redis Cache Pro requires the PHP extension PhpRedis 3.1.1 or newer. The extension is not loaded in this environment (fpm-fcgi). If it was installed, be sure to load the extension in your php.ini and to restart your PHP and web server processes.

By the way, we create the site by this tool at https://docs.wordops.net




It seems that I need update PHP extension PhpRedis 3.1.1 or newer?

but the Redis version is 5.3.2 now, and please check the screenshot:

redis.png



Any suggestion please?


Thanks in advance.
 
Last edited:
Hello,

Need help, and here is the info on my MULTISITE with subdirectory site, and here is what I used in wp-config by following their official suggestion at https://objectcache.pro/docs/installation/


/* Redis 配置 */
define('WP_REDIS_CONFIG', [
'token' => '79XegEAnob46AlUoMtM6FwCpmAAjCPhmlPzY52cFE6IYHYxsEdjFJ6QbJ98A',
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0, // change for each site
'maxttl' => 86400 * 7,
'timeout' => 1.0,
'read_timeout' => 1.0,
'split_alloptions' => true,
'debug' => false,
]);

define('WP_REDIS_DISABLED', false);



/* That's all, stop editing! Happy publishing. */



here is the screenshot:

screnshot.png


As screenshot show:

The Redis Cache Pro license token is invalid and plugin updates have been disabled


  • Status: Not connected
  • Drop-in: Valid
  • License: Invalid


An object cache error has occurred:
  • Failed to initialize object cache: Redis Cache Pro requires the PHP extension PhpRedis 3.1.1 or newer. The extension is not loaded in this environment (fpm-fcgi). If it was installed, be sure to load the extension in your php.ini and to restart your PHP and web server processes.

By the way, we create the site by this tool at https://docs.wordops.net




It seems that I need update PHP extension PhpRedis 3.1.1 or newer?

but the Redis version is 5.3.2 now, and please check the screenshot:

redis.png



Any suggestion please?


Thanks in advance.
did you do this?
wo stack install --redis
 
did you do this?
wo stack install --redis
yes, actually i always do this way: wo stack install --all, and create site by this way: wo site create mysite.com --wpredis --php74 --ls

by this way, wordpress site will run with redis cache, and it works well with nginx helper and Redis cache free version.

any suggestions please?
 
yes, actually i always do this way: wo stack install --all, and create site by this way: wo site create mysite.com --wpredis --php74 --ls

by this way, wordpress site will run with redis cache, and it works well with nginx helper and Redis cache free version.

any suggestions please?
We are talking about 2 different things here I would double check the reference documentation on wo stack install (I believe --all command is only applicable to wo stack upgrade --all )
--wpredis only installs the php end of the redis for wordpress.

You need to make sure the redis server is also installed in your instance.
try
systemctl status redis
see if it is already installed and running.
 
We are talking about 2 different things here I would double check the reference documentation on wo stack install (I believe --all command is only applicable to wo stack upgrade --all )
--wpredis only installs the php end of the redis for wordpress.

You need to make sure the redis server is also installed in your instance.
try
systemctl status redis
see if it is already installed and running.

Hello,

Here is Redis cache server info:

root@aadsfZ:~# systemctl status redis
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-02-28 19:26:41 CST; 2 months 22 days ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Main PID: 12934 (redis-server)
Tasks: 5 (limit: 9164)
Memory: 28.6M
CGroup: /system.slice/redis-server.service
└─12934 /usr/bin/redis-server 127.0.0.1:6379



root@aadsfZ:~# redis-server --version
Redis server v=6.0.6 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=d463d609620685c0
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock