Yep. @ben wrote a great guide here: https://kinsta.com/blog/bedrock-trellis/
I looked at Kinstaās features grid here:
And, it looks like SSH is included in all Kinstaās plans now.
Unfortunately it looks like that might have been an errorāthe features grid is back to how it was before.
Our biggest Sage 9 client is on WPEngine. We use a CircleCI deployment process and itās working flawlessly.
The DeployBot guide we published recently also covers WP Engine. https://roots.io/guides/automate-sage-9-deployment-with-deploybot/
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.
Ok!
Warning, this is really rough. Iāve edited out some personal info and tried to generalize some specifics. The shell script in /dev_assets/deployment can probably be bundled into the yml. And it needs better instructions. I have not tested this version. This is definitely alpha code.
Feedback welcome!
@slam - Iām implementing the CCI workflow youāve outline in your link, but running into issues with WPE validating the PHP when I push to the remote. There are syntax errors bing returned, which appear to be related to the use of PHP 7.2 vs. an older version <= 7. Everything builds fine locally and on CCI, but when it does the push from CCI is fails. Did you run into this issue?
I havenāt run into this issue, no.
But Iāve just this week updated my local containers to PHP 7.2, and my WPE sites are all still 7.0. Still, I canāt see how that would cause an issue.
Check to be sure your local install is PHP 7.2 and you are checking the error logs for issues.
If anyone runs into errors pushing to WP Engine while using Sage, try using the command āgit push -o nolint production masterā See https://salferrarello.com/wp-engine-syntax-error-composer-autoload_static-php/ for more context.
Tharris! Thanks for bringing this up.
Not a day after you posted this I ran into the same issue. My deploy was rejected due to a dozen PHP errors.
The issue is that WPE is upgrading sites to PHP 7.2, but their linter is still set for PHP 7.0. Thereās new syntax in PHP 7.2 that will cause the linter to fail and reject a deploy.
I wasnāt seeing this on my existing sites until I upgraded them to PHP 7.2. When I saw it I remembered your reply and was able to snag the -o nolint
syntax.
Thanks for this solution, it appears to work nicely, the only thing we have noticed however is that when sshāing in to the WP Engine server and cdāing to /tmp the sage-cache directory and cache files donāt appear to be there.
Is anyone else having this issue and, if so, does this mean itās compiling, temporarily creating the cache, loading the site, and then clearing the cache?
Any help would be appreciated.
Thanks in advanceā¦
Are you experiencing an error or problem on the site? Or is this more of a āhow should it be working?ā question.
If the site works I think youāre fine
Thanks for the fast response.
The site works fine, it was just a thought that if there are no cache files it is going to have to compile the blade files on each (uncached) request. Is that the case?
If I understand it correctly, WPEngineās ssh shell isnāt the actual container the site is hosted on. Itās more like some kind of temporary, heavily-siloed ssh environment that is created and destroyed with each ssh session ā this is why you canāt do things like create a persistent .bashrc file or add ssh keys.
When a Sage 9 site is run it generates the cache files in the real /tmp folder which the ssh shell does not have access to.
Iām about 80% confident the above is correct. =)
Canāt confirm for sure, but @slamās explanation sounds likely to me based on my impression of what WPE lets you access via SSH.
The more I think about it, the more likely it seems like the SSH container is a docker service where sites/mysite/
is volume-mapped to the web root of your install.
as a sidenote, sage10 also has problems with regular deployments on wpengine. but after some hours trying to fix the site i moved it to LocalWP and did the deployment from there, no more problems. the site was published and worked directly from the app.
I had zero luck with this approach. Same errors and tried without modifying view.php and modifying.
I was able to solve this by editing the path on the file
view.php
in sage > config > view.php change: ācompiledā => wp_upload_dir()[ābasedirā].ā/cacheā,
to: ācompiledā => ā/tmp/sage-cacheā,