Magento 2 CSS – pub/static CSS Not Found

less-cssmagento2

In developer mode I been getting the error

FileError: '/pub/static/frontend/theme/theme_name/en_GB/css/styles-m.css' wasn't found (404)

I've taken the following steps to try and resolve this:

Used Refresh static content in the cache management

Taken magento2 out of development mode, check if worked then back in development mode

Backup current static folder, removed contents inside and try to refresh.

All of these points still give me the error above

Best Answer

You need to deploy static-content with Magento 2.

At the least, your hosting company should be able to run this command for you.

  1. Make sure that you set your Magento application to developer mode.
  2. Need SSH credentials & access to your server
  3. Login to server using SSH via terminal, putty, etc.
  4. Navigate to Magento 2 root install directory using CLI
  5. Run this command:

_

php bin/magento setup:static-content:deploy en_GB
Related Topic