I have a big problem with magento, my css and javascript are not loading, I already did:

Content deploy; Deleted the static folder but kept the .htacess;

but nothing seems to work.

  • could you tell, which OS are you using and is magento installed on local or on server Commented Mar 17, 2018 at 18:14
  • what does the console error show? Commented Mar 17, 2018 at 22:27
  • Permissions -- Be sure that you have the proper user/group and permissions for the folders to generate and serve the content.
    – df2k2
    Commented Mar 18, 2018 at 1:33

2 Answers 2


Navigate to your pub folder in {docroot}/pub/static/frontend/{vendor_name}/{theme_name}/{language}/ and see what's there. If you have all the files you expect to see, that means you have an issue with the permissions on the newly deployed files. Odd are good that you need to either open up those permissions or you ran the deploy as the wrong user and now the server can read from them. There is no way to know what you need these settings to be from here, as we don't know your server configs, so it might be worth updating your question with these settings and see what they might need to change to for a fix.

If the files aren't there or look incomplete you need to deploy the files again with:

php bin/magento setup:static-content:deploy

You say you ran the deploy but then depleted the static folder. You have the order there backwards, you remove the old files and then deploy, but that might just be a typo. Just saying it here to make sure.


Do you have minification or bundling turned on?

What mode do you have Magento, is it Developer / Production?

Are you getting a 404 for each JS/CSS file?

Do you have the correct .htacces file present in your /pub/static folder? It should be this one https://raw.githubusercontent.com/magento/magento2/2.2-develop/pub/static/.htaccess

Have you tried running static-content:deploy for your store/themes language, for instance

php bin/magento setup:static-content:deploy en_GB

Clear all mage-* cache and fpc-* full page cache files

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.