I had a problem with magento 2, where in localhost I created the website and everything was fine, after importing to my server the CSS and JS was not working.
I search for so many answers and still no luck, after awhile I decided to simply start again, so I imported magento to my server, installed it with no errors, but when I entered the home page the CSS and JS does not work.
Here's a couple of things I already tried:
php bin/magento setup:content-static:deploy
deleting the static folder and keep the .htacess and run
php bin/magento setup:content-static:deploy
Replacing Symlink
with Copy
Checking the folders permissions
Here is the link of my website: http://maquinasdeoutrostempos.pt/
Thanks in advance
Best Answer
1] Check whether file permissions are given properly to all the Magento files
2] In your database run below query into "
core_config_data
" table and check you get any result or not3] If no then run below query
or
4] if "
dev/static/sign
" value is already exist into table set that 1 to 0run php bin/magento c:f , php bin/magento s:s:d -f
I hope this solve your problem.