If you experiencing the issue of “Failed to load resource: the server responded with a status of 404 (Not found)” for CSS and Js after installing Magento 2 on Wamp server windows, try following these steps.
Here are the steps which needs to be followed,
- Download Magento 2 zip from http://www.magentocommerce.com/download with sample data.
- Create new database in phpmyadmin,
- Extract zip in htdocs folder
- Install Magento 2, Make sure you use 127.0.0.1 instead of localhost in store URL and admin URL
- DO NOT run magento yet.
- Clear / delete caches and sessions of Magento 2. Go to following paths and delete everything:
ROOT > var > cache > *DELETE ALL*
ROOT > var > page_cache > *DELETE ALL*
ROOT > var > session > *DELETE ALL*
- Php.ini change max_execution_time to 500, memory_limit to 2048M, post_max_size to 2048M, upload_max_filesize to 2048M and max_file_uploads to 2048.
- Magento will try to create symlinks for some static resources on local server. You will need to change that behavior of Magento 2 by going to edit ROOT > app > etc > di.xml file.
- Open up di.xml, 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:
- Delete everything from ROOT > pub > static > DELETE ALL EXCEPT .HTACCESS
Do let us know via commenting if you are still facing any issue or share your feedbacks for this.