Magento 2 images,logo,font awesome,CSS and JavaScript not loading
I was facing this problem when I install Magento version 2. there solution is so simple
1.Open DOS Command Prompt from Xampp Control Panel.
Now Type this command:-
1.Open DOS Command Prompt from Xampp Control Panel.
Now Type this command:-
cd htdocs/(your folder name) PRESS ENTER
php bin/magento setup:static-content:deploy PRESS ENTER
2. Or We can try this second way.
We have to delete caches and sessions of Magento version 2. Go to following paths and delete everything:
ROOT > var > cache > *DELETE ALL*
ROOT > var > page_cache > *DELETE ALL*
ROOT > var > session > *DELETE ALL*
When Magento 2 is not in production mode, it will try to create symlinks for some static resources on local server. We have to change that behavior of Magento 2 by going to edit
ROOT > app > etc > di.xml
file. Open up di.xml
in your favorite code editor, find the virtualType name="developerMaterialization"
section. In that section below, you will find an item <item name="view_preprocessed" xsi:type="object">
which needs to be modified. You can modify it by changing the following content:Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink
To:
Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
Now last step, also delete old files generated in
ROOT > pub > static > DELETE ALL EXCEPT .HTACCESS