After running command rm -rf pub/static/* var/view_preprocessed/* var/cache/* and deployed done CSS and JS are not loading.
CSS and JS URL showing with static version is for admin and front end but showing 404 error.
I checked the files for particular directory JS and CSS are there.
How I can fix this
Please help.
Thanks.
Solved! Go to Solution.
You can follow the below simple solution if the version name showing in CSS and JS path
eg: pub/static/version3287934/
then you run below database query in my sql :
INSERT INTO core_config_data (path, value) VALUES ('dev/static/sign', 0) ON DUPLICATE KEY UPDATE value = 0;
After then clear config cache
php bin/magento cache:clean config
you can also disable static file version form admin :
Store->configuration -> Advanced -> Developer -> Static file settings
Set Sign Static files - No
You can follow the below simple solution if the version name showing in CSS and JS path
eg: pub/static/version3287934/
then you run below database query in my sql :
INSERT INTO core_config_data (path, value) VALUES ('dev/static/sign', 0) ON DUPLICATE KEY UPDATE value = 0;
After then clear config cache
php bin/magento cache:clean config
you can also disable static file version form admin :
Store->configuration -> Advanced -> Developer -> Static file settings
Set Sign Static files - No
Hello @johdanlusefa34
follow @Madhu Rajawat and also give permission to folder by command :
sudo chmod -R 777 pub/static/ pub/media/
And try with the permissions.
Thanks @Madhu Rajawat Resolved.
@gaurav_harsh1 There is no need to give file permission when we do configuration changes I think We need to clean config cache only.