Site icon MageComp Blog

Fixing: Failed to Load Resources Error After Installing Magento 2

Fixing Failed to Load Resources Error After Installing Magento 2 2

Fixing Failed to Load Resources Error After Installing Magento 2 2

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,

  1. Download Magento 2 zip from http://www.magentocommerce.com/download with sample data.
  2. Create new database in phpmyadmin,
  3. Extract zip in htdocs folder
  4. Install Magento 2, Make sure you use 127.0.0.1 instead of localhost in store URL and admin URL
  5. DO NOT run magento yet.
  6. 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*

  1. 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.
  1. 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.
  1. Open up di.xml, find the virtualType name=”developerMaterialization” section.
  1. 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

  1. 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.

Exit mobile version