{"id":12614,"date":"2017-02-09T14:05:49","date_gmt":"2017-02-09T13:05:49","guid":{"rendered":"https:\/\/www.oderland.se\/support\/artikel\/varfor-far-jag-meddelandet-internal-server-error-500\/"},"modified":"2023-05-16T15:48:09","modified_gmt":"2023-05-16T14:48:09","slug":"why-do-i-get-internal-server-error-500-on-my-website","status":"publish","type":"ht_kb","link":"https:\/\/www.oderland.se\/support\/en\/artikel\/why-do-i-get-internal-server-error-500-on-my-website\/","title":{"rendered":"Why do I get Internal Server Error 500 on my website?"},"content":{"rendered":"\n<p>Internal server error 500 \u00e4r ett v\u00e4ldigt generellt felmeddelande s\u00e5 det \u00e4r sv\u00e5rt att s\u00e4ga exakt varf\u00f6r det uppst\u00e5r. Men de vanligaste orsakerna \u00e4r:<\/p>\n\n\n\n<p>Internal server error 500 is a very generic error message. Therefore, it is very hard to pin down the reason as to why it occurs. However, a few common reasons are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Wrong permissions<\/strong> &#8211; Files and directories should not be writable by any other users than your own account. Therefore, directories should have permissions 755, and files 644. You can read more about how you set permissions <a rel=\"noreferrer noopener\" href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-use-the-file-manager-in-cpanel\/#change-permissions\" target=\"_blank\">here<\/a>.<\/li>\n\n\n\n<li><strong>Errors in .htaccess files<\/strong> &#8211; Even the tiniest syntax error in a <code>.htaccess<\/code> file will cause a 500 error, for instance if you happen to type a dot too many, of if you miss a space. The easiest way to see if the <code>.htaccess<\/code> file is causing the problem is by renaming it, <em>e.g.<\/em> to htaccess.txt. If the 500 error disappears, you know something in that file is wrong. You can read more <a rel=\"noreferrer noopener\" href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-use-the-file-manager-in-cpanel\/#rename-a-file-or-folder\" target=\"_blank\">here<\/a> about hos you change the name of a file.<br>To find which row causes the problem in the file, edit the file and comment out one section at a time. You comment out a row by adding a <code>#<\/code> to the beginning of the row.<\/li>\n<\/ul>\n\n\n\n<p>The error log available via cPanel should be able to help you find where the problem resides. You find it by first <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-login-to-cpanel\/\" data-type=\"ht_kb\" data-id=\"4236\" target=\"_blank\" rel=\"noreferrer noopener\">logging on to cPanel<\/a> and then clicking the icon <code>Errors<\/code> under <code>Metrics<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_errors.png\"><img loading=\"lazy\" decoding=\"async\" width=\"754\" height=\"198\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_errors.png\" alt=\"\" class=\"wp-image-18854\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_errors.png 754w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_errors-300x79.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_errors-50x13.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_errors-60x16.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_errors-100x26.png 100w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/a><\/figure>\n\n\n\n<p>Here you will see the last 300 lines of the error log of the server related to your account. You will not see any PHP errors here. PHP errors are logged in a different way, which you can find more information about <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/where-do-i-find-error-logs-for-php\/\" data-type=\"ht_kb\" data-id=\"12601\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Internal server error 500 \u00e4r ett v\u00e4ldigt generellt felmeddelande s\u00e5 det \u00e4r sv\u00e5rt att s\u00e4ga exakt varf\u00f6r det uppst\u00e5r. Men de vanligaste orsakerna \u00e4r: Internal server error 500 is a very generic error message. Therefore, it is very hard to pin down the reason as to why it occurs. However,&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"ht-kb-category":[209],"ht-kb-tag":[],"class_list":["post-12614","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-wordpress-websites"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/12614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/comments?post=12614"}],"version-history":[{"count":5,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/12614\/revisions"}],"predecessor-version":[{"id":18856,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/12614\/revisions\/18856"}],"wp:attachment":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/media?parent=12614"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-category?post=12614"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=12614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}