0

I just move my site from a server to new server. Everything works well excepting switching language. The style cannot load after switching language. I have been stuck whole day. Please HELP! THANK YOU!

  • Welcome, the issue is that you have not deployed all static content for all your languages. if you have multiple languages you will need to deploy the static content for each of them like so "php bin/magento setup:static-content:deploy en_US en_GB de_DE nl_NL -f" minus quotes also the lanugages will need to match the languages avaible on your website – Dava Gordon Sep 11 at 7:41
0

Run below command from console to check language code

php bin/magento info:language:list

Check configured language code and run below command

php bin/magento setup:static-content:deploy -f en_US

php bin/magento cache:flush

chmod 777 -Rf var/cache var/page_cache var/view_preprocessed pub/static/frontend

Please use configured language code instead of en_US in above command

  • Hi thank you for your reply. I have run the above command with language code. But it is still not working. Is there any other command I need to run? – lancwl Sep 11 at 5:46
  • @lancwl updated answer please check it – Prashant Valanda Sep 12 at 5:41
0

you need to run the static content deplay command with language code

something like this

 php bin/magento setup:static-content:deploy -f en_AU
 php bin/magento cache:flush
 php bin/magento cache:clean
 chmod -R 777 var pub generated

en_Au is language code , you need to pass all your language code

  • Thank you for your reply. But the issue is still there :( – lancwl Sep 11 at 6:34
  • update my answer please try that, and assign 777 permission to var pub and generator – Jigs Parmar Sep 11 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.