2

Changing site to production mode display below error on command terminal in (red color):

Enabled maintenance mode
Starting compilation
Compilation was started.
.....
.....
Generated code and dependency injection configuration successfully.
Compilation complete
Starting deployment of static content

Something went wrong while deploying static content. See the error log for details.

Command returned non-zero exit code:
`/opt/nexcess/php70u/root/usr/bin/php -f /chroot/home/siteRoot/html/bin/magento setup:static-content:deploy en_GB en_US`

if i execute command with skip compilation: php bin/magento deploy:mode:set production -s. It works but site display messed as css and js donest load.

Site is working well in developer mode but only issues with production mode.

Update: I figure out the problem. less files of font awesome was creating issues to change site to production mode.

Now CSS and JS is not loading in Production mode though Mode can be changed easily.

What can be reason of this?

bumped to the homepage by Community 23 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

1

Please check the folder path is exist "/home/siteRoot/html/bin/magento"

and also check the permission of var folder.

For folder, permission refer http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html

  • I am able to execute other commands and path (/home/siteRoot/html/bin/magento) exist. Is custom code effect the this or anything like enabled/disabled cache? – Jai Feb 27 '17 at 3:51
  • Yes, chances there may issue with your custom code which restricts to complete compilation (-s your skipping the compilation during the production mode set and use it at runtime ) You can figure out compilation error separately using the php bin/magento setup:di:compile – SATISH ASHILWAR Feb 27 '17 at 7:45
  • Compilation works well separatly also static content deployment. But "php bin/magento deploy:mode:set production" doesnt work. Do you think it can be issue of customize code as complication and deployment works spearately? – Jai Feb 27 '17 at 8:07
  • Well you can try on this by disabling customization step by step from /etc/config.php file. – SATISH ASHILWAR Feb 27 '17 at 13:05
  • I havent updated core code so i dont think it will matters. Well i try to do disabling custom tasks. – Jai Feb 27 '17 at 15:28
1

Try by deleting generated\metadata\global.php

1

"Maintenance mode" is not Production mode. Maintenance mode is an intrim mode when you are making changes to Production site. Could you please check the following:

  1. Did you make some changes to production change in Production mode itself and then ran "Enable Maintenance Mode"?
  2. Did you try the following:

    • Changing you production site to "Development Mode"
    • Clear var/cache, var/generation (make sure you don't delete .htaccess file), var/page_cache, var/view_preprocessed, pub/static (make sure you don't delete .htaccess file).
    • Run magento setup:upgrade, setup:di:compile and then setup:static-content:deploy. Then repeat the above step again
    • Give the appropriate permissions, check magento site to correctly.
    • Now "Enable Production Mode" and set the appropriate permissions for Production mode. If none of the above showed an error the site should be up and running.

Please let me know how did you go

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.