Is Sage 9 + WP Engine possible without Composer?

Hi, I built a theme locally with Sage 9 and it went pretty well. I’m trying to put it on WP Engine, but it seems like none of the classes/namespacing will work unless the theme is installed with Composer on the server (i.e. does not currently work on WP Engine at all). Is that correct, or am I just being dumb? I hope I’m being dumb, because we use WP Engine for all of our sites, and they don’t support Composer.

1 Like

How did you get the site on WP Engine? Are you using git to deploy?

Composer itself is not a requirement, however Sage 9 right now is currently depending on the generated files to autoload classes.

Basically, the vendor folder is required.

How are you getting the dist folder to WP Engine? You could handle the vendor folder in the same way. You could commit the folder (not really recommended), upload it somehow using a git hook, or you could also use a continuous integration/deployment service, many of them have a free tier. Codeship, Circle CI, etc. When you push to a particular branch, the CI server can run tests, run Composer, run npm/webpack, and upload the files to WP Engine.

3 Likes

Thanks for the detailed response Kalen. I was just using SFTP for quick and dirty solution, but I’ll check out those CI services. I had the vendor folder uploaded before, but I reuploaded it and now the theme is working. If I’m just changing template files and front-end files, I should just need to reupload dist and templates, right?

Having a similar issue but using Codeship to test and deploy the theme to WPE.

Running almost the exact same tests and build as in the themes .travis.yml, but when the theme hits WPE I see an error saying I need to run composer install in the theme directory.

Tried adding the vendor folder and the dist folder since those are not being deployed (assuming since they are ignored), and I just get a blank screen but its not a php error, possibly just a problem with the templating.

Feel like I am missing something basic but at my wits end, any suggestions on how to fix?

Are there any logs you can check on WPE? A blank screen generally means a very early PHP error

Thanks I got it working. Had to re-upload the vendors folder and that seemed to fix it