This is my first time posting on this forum. I have installed magento 2.0.7 in a cPanel hosting account. All is going well so far, I have added almost 1000 products already and I have also installed a new theme as well. The only problem I have are pages not loading completely every now and again on the backend doesn't matter what I'm doing, so I have to refresh the page for it to load fully, sometimes 2 or 3 times, it looks like and ajax issue. However that is a different problem.

The point of this post is post is to find out if I HAVE to run the magento setup:static-content:deploy command or not. As stated I have installed Magento 2.0.7 successfully in a cPanel account and it has been working fine since the installation completed. I have installed magento 2.0.7 on a VPS as well but noticed that the storefront would not load correctly till I ran magento setup:static-content:deploy, which is not the case here. So please tell me whether It is still necessary to run the command or if it is fine the way it is.


I have faced the same problem, resolve by the following command:

Execcute the commans as in given sequence

1: rm -rf var/di/* var/generation/* var/cache/* var/page_cache/* var/view_preprocessed/* var/composer_home/cache/*
2: sudo chmod 777 var -R
3: sudo chmod 777 pub -R
4: sudo php bin/magento setup:static-content:deploy
5: Repeat step 2 & 3.

Hope this will also help you.

  • Hi iPragmatech, is it not a bad thing to assign 777 instead of 755 to directories? – AndrewH Jul 24 '16 at 17:44
  • Thanks @AndrewH sure 755 is better. I have ad 777 here because both directory contains static data so we need not worry regarding security concern. – user40382 Jul 25 '16 at 10:57

For proper functioning of Magento 2, you need to run these 2 commands:

  • php bin/magento setup:upgrade
  • php bin/magento setup:static-content:deploy

Please use command as describe here:

Magento 2: Controlling M2 via command line – when and why to use each command

that may help you!!

    First You need to clear Flush Static File Cache from Backend.

    Go to Magento Backend Systm->Cache Management->Click on Flush Static File Cache. 

    After Flush File regenerate Pub File than Run Below Command.

    php bin/magento setup:upgrade

    php -dmemory_limit=6g  bin/magento setup:static-content:deploy

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.