If CSS and Javascript files are not loading after Magento 2 installation

admin/ April 5, 2016/ Linux, Magento2/ 3 comments

If you are facing problem of css and js page load design after installation in magento2

please follow the following step-:

open the terminal and navigate to magento web root

 $ cd /var/www/html/magento2

Step 1.

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

Step 2.

$ php bin/magento indexer:reindex

Step 3.

make sure apache “rewrite_module” is enable and then restart the server

Step 4.

$ chown -R www-data:www-data /var/www/html/magento2

Step 5.

$ chmod -R 775 /var/www/html/magento2/ 
$ chmod -R 777 /var/www/html/magento2/var/
$ chmod -R 777 /var/www/html/magento2/pub/

Step 6.

delete cache folder under var/cache

The above step working. I hope this will work for you also.

Let me know if any issue. 🙂

3 Comments

  1. It would be problem to set permission 777 for the all the files and folders under magento installation.

    1. Thanks Allen,

      I have updated my post.

  2. Pingback: Basic Configuration | My Notes

Leave a Reply