I still don’t fully understand how Blade figures out which hashed template to load, but I was able to set up a CI pipeline on WPE. I found that Toby’s instructions don’t work precisely with the current WPE setup—the biggest difference is that I push templates to the plugins folder instead of the WP root. Specifically, I stuck it in mu-plugins. Will share exact config details after a little more testing. [/edit]
I’ve been struggling to hammer out a good workflow for deploying to the WPEngine environment. I’m close—but I can’t seem to get the right set of compiled templates into the live environment.
Theme in question is built on Sage 9.0.0-beta.2.
My setup is slightly different from Toby’s: I’m using PHP 5.6.31 locally and in WPE, so I used a PHP 5.6.31 Docker container as well. I also find that I need to run Blade Generate twice—the WP CLI won’t let it run the first time.
The CI pipeline does work as I would expect, and pushes everything inside my theme root, along with the compiled blade templates at the WP dir root. The site doesn’t work normally after this push, however. I end up with a bunch of errors from Illuminate’s
PhpEngine.php, which can’t seem to find the right hashed template. It tries to load files that don’t exist.
One odd observation: which each push, I should sending a completely new set of templates to WPE. So, I would think Blade could find all the files, or perhaps it would fine none? On the front end, SOME templates do typically load, but not all. Clearing the WPE object cache sometimes seems to help, but there are always some templates that stay missing.
So! How should Blade determine which hashes it’s looking for? Did I miss a step in forcing the theme to recognize new hashes? Should I just start shopping for another host?