After installation, the Magento 2, css and js files are not loaded.
2 Answers
Flush cache
Delete var/* and pub/static/*
Use php bin/magento setup:static-content:deploy
-
-
-
-
In DB, table: core_config_data find path "dev/static/sign" and update value to "0"; After that repeate steps, which I wrote above.– Igor T.Feb 12, 2018 at 12:47
-
Remove all files from pub/static
except .htaccess
Go to app/etc/di.xml
and replace from
Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink
to
Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
=> Run Following Commands:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
chmod -R 777 *