Closed RayHollister closed 1 week ago
Rather than just disabling Redis on Lando, I'd like to see if it's possible to get Redis to actually work with Lando. The errors in #9206 suggest 'serializer' => 'php'
and 'compression' => '<something that's not zstandard>'
would work for an alternate config. Possibly those could just be unset from the configuration for local? I'll do some digging, but if you want to test those config changes, that would also be great. I'd like disabling Redis entirely to be a last resort.
This is what I've got set and seems to be working locally:
$ocp_settings = [
// All your OCP defaults, except use the following for the token:
'token' => isset( getenv( 'OCP_LICENSE' ) ) ? getenv( 'OCP_LICENSE' ) : '',
// ...other stuff...
];
if ( isset( $_ENV['LANDO'] && 'ON' === $_ENV['LANDO'] ) {
$ocp_settings['serializer'] = 'php';
$ocp_settings['compression'] = 'none';
}
define( 'WP_REDIS_CONFIG', $ocp_settings );
Note: I'm getting a License error locally even when the token is correct. I've a side conversation with Till from OCP about that, but I don't think the license impedes functionality, so I think just an empty string for that as a default would still work.
Added my suggested recommendation to https://github.com/pantheon-systems/documentation/pull/9327. I prefer this because I would rather not recommend simply disabling OCP (but that's included as an option).
There's other changes I've been meaning to make in there, too.
Closing in favor of https://github.com/pantheon-systems/documentation/pull/9327
Summary
Enable Object Cache Pro for WordPress - Added note after 6c advising Lando users to disable Redis to prevent it from deactivating their server. Suggested by @pwtyler and tested by myself.