when I go to the admin url like (mydomain.com/admin) I get 500 Internal Server Error but it just happened when I switch default language to something other than en_US when I change it to en_US everything is good and no error appended.
1 Answer
This is because static content is not compiled for this language, and no previous user had this language selected.
When compiling static, Magento uses only languages that are required, and in order to determine this, it looks into database for used languages. Since there were none other prior to your change, only English was compiled.
Easiest way to fix this is to run bin/magento deploy:mode:set production
after switching the language, though bin/magento setup:static-content:deploy
may be enough as well.
-
I did not try bin/magento deploy:mode:set production but bin/magento setup:static-content:deploy not work for me, and this error is just for admin page frontend is ok– ali ghDec 17, 2016 at 16:43
-
In the output of the
bin/magento setup:static-content:deploy
did you see that Magento processed language you have selected? Also, make sure that command is executed after the language has been changed in admin– StjepanDec 17, 2016 at 16:52 -
-
What does the error message say? If it is not logged in Magento folders, than one from the server/php– StjepanDec 17, 2016 at 17:35
-
there is no error log in both server and magento ,this is a 500 http error with no log!– ali ghDec 17, 2016 at 20:50