Magento 2 CSS and JavaScript not loading

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 777 /var/www/html/magento2 

Step 6.

delete cache folder under var/cache

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

Command to change the mode (Developer,Production..etc)

open the terminal and navigate to magento web root


$ php bin/magento deploy:mode:show
$ php bin/magento deploy:mode:set production

Comments

Popular Posts

Magmi Single and Multiple Category Importer