cancel
Showing results for 
Search instead for 
Did you mean: 

Static content issue - 404 error

Static content issue - 404 error

Hi,

 

My website is showing suddenly 404 error. static folder has .htaccess file more over site is running around 6 months without any issues. how suddenly throwing 404 error. Please tell me anyone. Thanks

3 REPLIES 3

Re: Static content issue - 404 error

Hi @gkarthick87 

 

what changes you did recently ? what is the error in console ? what does the log files show error ? I had the same issue and it was because of web_base_url by command :

php bin/magento config:set web/unsecure/base_url YOUR PROJECT URL

Then run below commands :

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento c:f

Hope it helps to resolve your problem.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Static content issue - 404 error

Hi @gkarthick87 

 

Go to following paths and delete everything:

ROOT > var > cache > *DELETE ALL*
ROOT > var > page_cache > *DELETE ALL*
ROOT > var > session > *DELETE ALL*

Then run all required magento2 commans:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

It may help you!
Problem Solved? Please click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!

Re: Static content issue - 404 error

Hello @gkarthick87 ,

Delete var folder and then run below commands

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush

happy coding Smiley Happy