I know so many others have asked the same question but still no reliable ans is available.

Suddenly my site is hitting the wrong path of static content (CSS/JS/IMAGES) because of this my site is not loading.

static path is adding version140*****

Same problem discussed in this question

But still same problem is there for my custom CSS still url is wrong.


Version part is getting added automatically.

  • I have the same problem with this one. Apr 27 '17 at 6:49

This is due to Magento "Signing" the files. Essentially it forces Magento to regenerate the public static files on page reload by adding the current timestamp to the files.

This may have changed due to an upgrade of version so check the following configuration is set to no:

Store -> Configuration -> Developer -> Static Files Settings -> Sign Static Files

Be sure to flush the caches after this has been changed


I tried EVERYTHING to no avail, so I finally decided to do it the "wrong" way:


Commented out line 66

$baseUrl .= $this->renderUrlSignature() . '/';

After that the admin loaded fine and I checked the "signage" setting. It was still set to "YES" although I had set it to "0" in the database - maybe wrong scope or whatever.

Then I uncommented line 66 back in and it still works fine.

4 hours of my life gone, hope this helps somebody else.

  • You saved me about 4 hours of my life.
    – primo
    Aug 5 '17 at 9:56
  • it does helps me :) Jul 12 '19 at 5:34

If you keep the pub/static/.htaccess file in developer mode you don't need to run any compilation command: Magento will create symlinks to files as soon as they are requested. That means that changes to static assets will be visible immediately, provided you also have cache disabled.

You can delete the pub/static/frontend or pub/static/adminhtml instead.

In default mode assets are materialized in pub/static subfolder, meaning they are created (copied, not symlinked) at first request. If you modify them you have to flush the cache to have them updated.

In production mode assets are not materialized (causing 404 HTTP error upon request) until you run the php bin/magento setup:static-content:deploy command.

  • what about the version14****** which is getting added in static content url Feb 17 '17 at 11:33
  • just delete .htaccess file remove then check .htaccess generate or not if not then issue remian.. Feb 17 '17 at 11:39
  • removed pub/static/.htaccess issue remains same (.htaccess is not generating) after I put .htaccess manually all css/js is loading properly except my modules css/js (version14******** getting added in it). Feb 17 '17 at 11:48
  • More detail please Refer this article..magento.stackexchange.com/questions/94502/… Feb 17 '17 at 11:54

The issue lies with the way magento checks if the the theme is allowed. It uses a DIRECTORY_SEPARATOR on windows this is a backslash: \ the array with theme_names in the function isThemeAllowed() is formated with forward slashes. So the checks fails, and return a 404 error. replace the DIRECTORY_SEPARATOR with a forward-slash and your files will load dynamic.

File: magento-root\vendor\magento\framework\App\StaticResource.php

Line: 171


`if (!($this->isThemeAllowed($params['area'] . DIRECTORY_SEPARATOR .` $params['theme'])


`if (!($this->isThemeAllowed($params['area'] . "/" . $params['theme'])`

I did update on magento´s database and its works for me.

UPDATE core_config_data SET value = 'http://localhost/magento2' WHERE core_config_data.config_id = 2;

UPDATE core_config_data SET value = 'https://localhost/magento2' WHERE core_config_data.config_id = 3;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.