{"id":7338,"date":"2019-04-19T12:02:40","date_gmt":"2019-04-19T12:02:40","guid":{"rendered":"https:\/\/ampforwp.com\/tutorials\/?post_type=ht_kb&#038;p=7338"},"modified":"2019-07-23T12:06:28","modified_gmt":"2019-07-23T12:06:28","slug":"how-to-debug-a-fatal-error-also-known-as-500-error","status":"publish","type":"ht_kb","link":"https:\/\/ampforwp.com\/tutorials\/article\/how-to-debug-a-fatal-error-also-known-as-500-error\/","title":{"rendered":"How to debug a fatal error also known as 500 Error"},"content":{"rendered":"\n<h3><strong>Why  Fatal error Occur<\/strong>s <strong>?<\/strong><\/h3>\n\n\n\n<ol><li>These happen when your function name same, syntax error, missing the code from a file or incorrect code at that time Fatal error will occur. <\/li><li>This error usually occurs when installing or upgrading a  theme or plugin. They could be conflicting with each other maybe because of the same function name or class name. It could also be caused by a failed plugin\/theme update.<\/li><li>Due to this above reasons, your website will be blank and the 500 error message will appear on the browser.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"600\" height=\"320\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/500.jpg\" alt=\"\" class=\"wp-image-7394\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/500.jpg 600w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/500-300x160.jpg 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/500-50x27.jpg 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/500-60x32.jpg 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/500-100x53.jpg 100w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<h3><strong>How to debug a fatal error <\/strong><\/h3>\n\n\n\n<p><strong><mark style=\"background-color: yellow;\">\nStep 1:<\/mark><\/strong> Check your website directory and open the wp-config file on your server. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"615\" height=\"533\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/wp-config.png\" alt=\"\" class=\"wp-image-7354\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/wp-config.png 615w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/wp-config-300x260.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/wp-config-50x43.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/wp-config-60x52.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/wp-config-100x87.png 100w\" sizes=\"(max-width: 615px) 100vw, 615px\" \/><\/figure>\n\n\n\n<p>In this file you need to search for this code WP-DEBUG it will be false you need to make that true see the below screenshot.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"731\" height=\"156\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/true-1.png\" alt=\"\" class=\"wp-image-7407\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/true-1.png 731w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/true-1-300x64.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/true-1-50x11.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/true-1-60x13.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/true-1-100x21.png 100w\" sizes=\"(max-width: 731px) 100vw, 731px\" \/><\/figure>\n\n\n\n<p>Once you save this file and refresh your website it will show exact error why your site is down like.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"869\" height=\"231\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/fatal-error-2.png\" alt=\"\" class=\"wp-image-7380\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/fatal-error-2.png 869w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/fatal-error-2-300x80.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/fatal-error-2-768x204.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/fatal-error-2-50x13.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/fatal-error-2-60x16.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/04\/fatal-error-2-100x27.png 100w\" sizes=\"(max-width: 869px) 100vw, 869px\" \/><\/figure>\n\n\n\n<p><strong><mark style=\"background-color: yellow;\">\nStep 2:<\/mark><\/strong> From the above screenshot, you can see the exact path which has caused your website down and you can see the exact path that is the line number along with the name of the file and also the plugin name. So you need to read the message and find out which plugin or theme made your website down<\/p>\n\n\n\n<p> <strong><mark style=\"background-color: yellow;\">\nStep 3:<\/mark><\/strong> Once you got it then you need to delete that particular plugin or theme and your website will be up and running instantly.<\/p>\n\n\n\n<p style=\"background-color: #ffdddd; border-left: 2px solid #f44336; padding:10px;\"><strong>Note:<\/strong> If it is one of your old plugin or theme which you are using then you just need to rename the file name and it will automatically be deactivated in the dashboard.<\/p>\n\n\n\n<p>Lastly, you just need to contact that particular plugin or theme authors and tell them that you have faced this issue when installing or updating their plugin or theme and there will help you in fixing those error.<\/p>\n\n\n\n<p><strong>That\u2019s it for this tutorial!<\/strong><\/p>\n\n\n\n<p>We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.<\/p>\n<div id=\"div-1\" class=\"hkb-feedback\">\n\t\t\t<strong class=\"ht-mobile-exit__title\">Ask your Questions Directly!<\/strong><br>\n\t\t\t<div class=\"hkb_widget_exit__content\" style=\"font-size: 14px;\">If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!<\/div>\n\t\t\t<a href=\"https:\/\/ampforwp.com\/support\/#contact\" id=\"button\" target=\"_blank\" rel=\"noopener noreferrer\"><button>Yes, I have a Question<\/button><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Why Fatal error Occurs ? These happen when your function name same, syntax error, missing the code from a file or incorrect code at that time Fatal error will occur. This error usually occurs when installing or upgrading a theme or plugin. They could be conflicting with each other maybe&#8230;<\/p>\n","protected":false},"author":18,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":[],"ht-kb-category":[34],"ht-kb-tag":[],"_links":{"self":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/7338"}],"collection":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/comments?post=7338"}],"version-history":[{"count":73,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/7338\/revisions"}],"predecessor-version":[{"id":12992,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/7338\/revisions\/12992"}],"wp:attachment":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/media?parent=7338"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-category?post=7338"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-tag?post=7338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}