Magento2 – Fixing Wrong Path of Static Contents

frontendmagento-2.1magento2static-content

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.

pub/static/version1487328792/frontend/Magento/luma/en_US/Codilar_RenderBook/css/style.css.

Version part is getting added automatically.

Best Answer

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

Related Topic