Magento – Magento 2.2 set/Deploy Production mode stuck at ‘Static content deployment’

deploymagento2minifyproduction-modestatic-content-deploy

I have configured my magento 2.2.3 in server and checked the mode. It was "default". Then I tried to change the mode to production with this command,

php bin/magento deploy:mode:set production

After executing the above command, some repositories and proxy generation scripts are automatically executed and the "Compilation completed" message had shown. After that "Starting deployment of static content" message showed and it still showing after 30-40 minutes. Is there anything to do to complete the step?

Note: I have enabled the css minify, js minify, merge and bundling from magento admin.

Server: Digital ocean with 8 GB RAM and 4 core processor.

Best Answer

When you got stuck then cancel that process by ctrl+c.

By doing that you can get your production mode set perfectly but then you will need to fix the deploy error.

Following are the steps to track the error.

Run the following command:

php bin/magento setup:static-content:deploy -vvv

By doing that you can see the all processes which is performing at backend and then when it stops then you can check that module. The error must come from that module. So, you can either disable it or fix it.

You can disable it temporarily and then run the deploy command again to check if there any other error or not. If deploy process don't stuck then you will need to fix that disable extension/module.

Related Topic