2

I've recently deployed a magento 2 from local to live environment, local was working fine and everything was running smoothly. I've also enabled production mode, but i've not turned on css or js compression.

When i did an rsync from my local machine to the live box, the build stopped working, I had to run the:

bin/magento

Command on the live server, to recompile the theme by doing a static content deploy:

bin/magento setup:static-content:deploy

Before this the theme doesn't work, after works fine.

What's changing from rsyncing the files to the server, why can't i run it on a build server and sync it. Sorry for the so many 'whys?' but i'd like to understand how to do it without running any commands on the server. Or is this not possible?

Thanks.

1

so you did not have compression activated on local, but on production, and then uploaded all files?

When compression is activated, all js and css files are renamed to .min.js/css

so if you just upload the files wihtout the .min. part from your local env, magento can't find them because it's searching for the .min. files in the pub/static folder as soon as compression is activated

  • Yes i think the compression might have been the issue, i thought i turned it off, but i didn't then remove files ect. Thanks for the advice :) – andy jones May 29 '17 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.