-
Notifications
You must be signed in to change notification settings - Fork 683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Object Cache Pro for WordPress Doc Update #9206
Comments
Hi @RayHollister thanks for opening this issue. I just want to make sure, are you able to successfully set up Object Cache Pro following the non-composer steps here? |
No, when I followed the Non-Composer section instructions, it did not set up correctly. I was only able to get it working using a combination of some of the steps in the Non-Composer section and adaptations of the steps in the Composer-Managed section. Unfortunately I did not document what it took to get it working. I kind of had to poke around and try things until it worked correctly. Also unfortunately, I am still unable to get it working correctly on Lando. In order to develop locally I have to delete the object-cache.php drop-in file and restore it before I push my changes. |
@RayHollister Can you share what failed when you tried to use the Terminus command? Was there an error that was visible in the Workflow Log? Did you previously or do you currently have other object cache plugins installed (like WP Redis)? The Composer instructions are specifically for sites using the WordPress (Composer Managed) Bedrock-based upstream. The files and functions that you refer to are unique to Bedrock-based WordPress sites. See: https://roots.io/bedrock/docs/configuration/ |
Todo:
|
OK, I just went through the process again, and here's my experience. I went through all of the instructions on Enable Object Cache Pro for WordPress through line 6c of Installation and Configuration for non-Composer WordPress Sites It worked fine on the multidev server, but when I pulled it to my local Lando server, it will only gives me the error: "Error establishing a Redis connection" on the browser.
If I shut down the Lando server down and restart it, I just get |
I've never successfully enabled Redis in Lando, can you try adding to your wp-config.php? This should prevent it from trying to initialize while running locally. if ( isset( $_ENV['LANDO'] ) && 'ON' === $_ENV['LANDO'] ) {
define('WP_REDIS_DISABLED', true);
} |
I was literally in the middle of doing that when I got the notification from GitHub. 🤣 I'll let you know if it works. |
@pwtyler OMG FINALLY! I can work on my Lando servers again! I guess I don't really need Redis on my Lando servers. 🤷🏻♂️ But since Lando includes Redis support I just assumed I was doing something wrong. I'm gonna test it on another Lando, and if it works, I'll submit it as a recommended edit and close out this issue. |
Done and Done. Tested it on three broken and sad Landos on my computer. Submitted Pull Request #9309 |
Ah, I just re-read your error! Using a similar pattern, try setting serializer to $serializer = "igbinary";
if ( isset( $_ENV['LANDO'] ) && 'ON' === $_ENV['LANDO'] ) {
$serializer = "php";
}
....
// Within WP_REDIS_CONFIG...
'serializer' => $serializer, https://objectcache.pro/docs/configuration-options#serializer |
@pwtyler No luck. It just kept giving me Got this in
|
Wow, good catch. I have no idea where that code snippet came from. I literally copied and pasted from your comment in pantheon-systems#9206 Co-authored-by: Phil Tyler <[email protected]>
Different error at least, similar, may be able to adjust the compression setting to something that is supported by Lando's version of PHP
|
Re: Enable Object Cache Pro for WordPress
Priority: Medium (choose one, remove the other options)
Issue Description:
Instructions are woefully out of date. None of them work.
Suggested Resolution
Go through the whole page and rewrite it. The most heinous part is "config/application.php". That file does not exist.
The text was updated successfully, but these errors were encountered: