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. Commented Apr 27, 2017 at 6:49

5 Answers 5


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 cannot change the value because the CSS / JavaScript failed to load. I was able to do it with the command bin/magento config:set dev/static/sign 0 (magento.stackexchange.com/questions/208666/…) but in my case some folders like extjs were still missing so I also used commands php bin/magento setup:static-content:Deploy -f and php bin/magento cache:flush.
    – baptx
    Commented Jun 15 at 0:23

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
    Commented Aug 5, 2017 at 9:56
  • it does helps me :) Commented Jul 12, 2019 at 5:34

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'])`
  • You saved me so much time with this, thank you! Commented Sep 9, 2022 at 12:39

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 Commented Feb 17, 2017 at 11:33
  • just delete .htaccess file remove then check .htaccess generate or not if not then issue remian.. Commented Feb 17, 2017 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). Commented Feb 17, 2017 at 11:48
  • More detail please Refer this article..magento.stackexchange.com/questions/94502/… Commented Feb 17, 2017 at 11:54

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 and acknowledge you have read our privacy policy.

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