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:-
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

Popular posts from this blog

Cant use dump() function in twig files or how to enable debug in opencart twig or print_r alternate use dump() in opencart 3.0

maximum execution time error when importing sql data file since php.ini has been already set max execution time 3000

SEO Custom URL in Opencart