How to deploy Sage?

Just tried to deploy my first sage theme using composer/git and I just get a blank white screen.

Enabling wp_debug at least tells me it’s trying to include 3 cache files that don’t exist, but it’s including them, not requiring them.

Warning: include(/var/www/web/app/uploads/cache/73e5c39a3d79a87a42d4543fb2b83a9847f4f5f4.php): failed to open stream: No such file or directory in /var/www/web/app/themes/coinninja/vendor/illuminate/view/Engines/PhpEngine.php on line 43

The site is also using Bedrock, and other themes work fine. Sage works fine on my local and there’s nothing in the apache log.

Edit: Adding these files from my local fixed it… but shouldn’t I not have to copy over the uploads cache directory when deploying the site? lol

I’m using the default gitignore and everything. Only have 2 plugins installed, disabling them didn’t do anything.

I tried…

git clone repo
composer install (for bedrock)
composer install (in theme directory)

…which results in a dead site until I rsync everything else over. Is that normal?

To answer the question in your topic: https://roots.io/sage/docs/theme-deployment/

No, sounds like you have a permissions issue with your webserver.

Yes… all of the theme files should be in place in order for it to work.

We always recommend using Trellis/Capistrano-like deploys, so that when you deploy an update to your site that it doesn’t break things while you’re in the middle of transferring/uploading files. Deploying your theme shouldn’t involve FTPing files to your live site… that’s irresponsible :slight_smile:

Hi,
I’m having the exact same issue on a different webserver than the one I’m used to. The log tells me PHP is looking for files in /www/app/uploads/cache/ (which are not there for obvious reasons). How is this a permission issue? Idk how to fix this…

Try clearing the Blade cache?

I think that’s part of the issue: there is no cache. I deployed on my other server and everything worked like a charm. So perhaps it has something to do with permissions preventing the cache files to be generated. If I find a solutions or more details, I will post them here.

Edit: There was indeed a permission issue for the uploads/ directory. Granting the server writing access did the trick.