Roots Discourse

Sage 9 on WPEngine

So far this is not working for me. I’m chatting to a support person right now and he’s saying that so far this issue hasn’t been resolved.

Do I need to define a temp directory within the wp-config.php?

This is what I have in my view.php

'compiled' => wp_upload_dir()['basedir'].'/tmp/sage-cache',

Thanks :slight_smile:

Re-read the solved post in this thread and note the value. You aren’t using the same one.

Hi. There are times (maybe many times) I just can’t control hosting. I run into WPE a lot (I actually kind of like it). Has changing the compile directory to ‘/tmp/sage-cache’ been the fix? Any caveats?

Also, have there been any other obstacles with other hosting? I imagine this might occur on managed hosting type scenarios. Another one I am thinking of starting to use is Flywheel.

Thanks.

Hey @John - changing that path has worked for me with no issues or caveats. Easy and as far as I can tell complete fix.

@mmirus Thanks. That’s what I like to hear : ) .

1 Like

Confirmed. This worked for me and allowed me to duplicate and use template-custom.blade.php.
To echo what I did:

in sage > config > view.php

change: 'compiled' => wp_upload_dir()['basedir'].'/cache',
to: 'compiled' => '/tmp/sage-cache',

And re-upload your view.php file.

4 Likes

For the first it was ok.

Now it seems like the add to cart, and all the cart stuff doesn’t work. For example if you add to cart product, then another, there is only one product in the cart. Cart icon with number of items in it is not updated. Everything works perfectly while youre logged in as admin, but after logout it stops.

I’m afraid that I will have to recreate theme files to simple ones. As Sage is too complicated using it with WPEngine

@Sid - are you testing this on WP Engine’s production or staging environment? If in production, that actually sounds like it might not be a Sage-related problem, but a problem with WP Engine’s caching layer. I would hop on chat with their support and talk with them about creating exceptions in their caching for your cart page and cookies, and anything else you might need to do.

Basically, any time there is user- or session-specific content in your theme (like a shopping cart) you will need to make sure those parts of the theme/templates aren’t being cached by WP Engine. Same for info they depend on from the client, like cookies. You can do that by creating exceptions in their caching layer (by talking with support) or by loading those pieces of content separately via an AJAX call after the page has loaded.

2 Likes

Ahhhh You were right. Thank You for pushing me to contact them. As yesterday I was chatting with them all day because of this topic problem. So i really haven’t thought they will help me with this. Thank You again!

1 Like

@toby - your link above is broken, here’s the correct one:

Can anyone confirm that this process still works with the latest versions of Trellis, Bedrock and Sage?

We have a project we built for a client currently being controlled with Github and hosted on a DO droplet. They are insistent that the final staging and production environments are hosted with WPEngine.

We’re trying to get them to consider Kinsta but have a feeling they won’t want to switch. Ben Word wrote a great article on how to use Bedrock and Trellis on Kinsta, so that seems like a no brainer for a client wanting to use managed hosting --> https://kinsta.com/blog/bedrock-trellis/

Anyone have an recent news on this stack with WPEngine?

Thank you all.

AFAIK you just can’t use Trellis and Bedrock on WPE, only Sage. Someone else may have better info, though.

That is my understanding as well.
Getting Sage to run on WPE was a pain on it’s own, but I don’t think it’s possible to manipulate the root folder structure of a WPE install and have it work properly. If you need Trellis and Bedrock to work, I’d suggest saving yourself the headache and attempting to convince them to switch over to a Kinsta install.

FYI: Now through the end of September, Kinsta is offering unlimited free site migrations to move from WP Engine

2 Likes

In order to use this stack with Kinsta, is the “Business 1” plan required since the other entry level plans don’t support SSH?

Yep. @benword wrote a great guide here: https://kinsta.com/blog/bedrock-trellis/

1 Like

I looked at Kinsta’s features grid here:

And, it looks like SSH is included in all Kinsta’s plans now.

2 Likes

Unfortunately it looks like that might have been an error–the features grid is back to how it was before. :frowning:

Our biggest Sage 9 client is on WPEngine. We use a CircleCI deployment process and it’s working flawlessly.

2 Likes

The DeployBot guide we published recently also covers WP Engine. https://roots.io/guides/automate-sage-9-deployment-with-deploybot/

1 Like

It would be cool if you could share your config.yml. CircleCI would be better than DeployBot for most as it’s free plan is enough in most cases.