{"id":9323,"date":"2020-04-12T10:58:50","date_gmt":"2020-04-12T10:58:50","guid":{"rendered":"https:\/\/www.milesweb.in\/hosting-faqs\/?p=9323"},"modified":"2026-02-27T12:47:57","modified_gmt":"2026-02-27T07:17:57","slug":"turn-off-php-error-reporting","status":"publish","type":"post","link":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/","title":{"rendered":"Learn to Turn Off PHP Error Reporting"},"content":{"rendered":"<p>Websites generate PHP errors and log in error_log files in the directory where your PHP files are placed. In case you don\u2019t require the error_log file, PHP error logging can be disabled using a simple code.<\/p>\n<h3>Steps to Turn Off PHP Error Reporting<\/h3>\n<p>Login into your cPanel account and go to the <strong>Files<\/strong> section and click on the <strong>File Manager<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9324\" src=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png\" alt=\"\" width=\"836\" height=\"231\" srcset=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png 836w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min-300x83.png 300w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min-768x212.png 768w\" sizes=\"auto, (max-width: 836px) 100vw, 836px\" \/><\/p>\n<p>In the <strong>File Manager<\/strong>, click on <strong>Settings<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9325\" src=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/settings-min.png\" alt=\"\" width=\"650\" height=\"252\" srcset=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/settings-min.png 650w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/settings-min-300x116.png 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>Check the box for the field <strong>\u201cShow hidden files\u201d<\/strong> and click on <strong>Save<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9326\" src=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/edit-1-min.png\" alt=\"\" width=\"503\" height=\"333\" srcset=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/edit-1-min.png 503w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/edit-1-min-300x199.png 300w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/p>\n<p>Select the <strong>.htaccess<\/strong> file and click on <strong>Edit<\/strong> from the above section.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9327\" src=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/htaccess-1-min.png\" alt=\"\" width=\"731\" height=\"331\" srcset=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/htaccess-1-min.png 731w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/htaccess-1-min-300x136.png 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p>Now, just add the below code and click on <strong>Save Changes<\/strong>.<\/p>\n<pre class=\"lang:default decode:true \">php_flag display_errors off<\/pre>\n<p>Congrats! You have now learned to turn off the PHP error reporting using the .htaccess file.<\/p>\n<p><strong>Also Read:<\/strong><br \/>\n<a href=\"https:\/\/www.milesweb.in\/hosting-faqs\/steps-to-enable-php-error-logging-automation\/\" target=\"_blank\" rel=\"noopener\"><strong>Steps to Enable PHP Error Logging &amp; Automation<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Websites generate PHP errors and log in error_log files in the directory where your PHP files are placed. In case you don\u2019t require the error_log file, PHP error logging can be disabled using a simple code. Steps to Turn Off PHP Error Reporting Login into your cPanel account and go to the Files section and [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3048],"tags":[18,982,1399,1398],"class_list":["post-9323","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-website-and-application-management","tag-php","tag-php-error-logging","tag-php-error-logs","tag-php-error-reporting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn to Turn Off PHP Error Reporting<\/title>\n<meta name=\"description\" content=\"Websites generate PHP errors and log in error_log files in the directory but PHP error logging can be disabled using a simple code, if you don&#039;t require.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn to Turn Off PHP Error Reporting\" \/>\n<meta property=\"og:description\" content=\"Websites generate PHP errors and log in error_log files in the directory but PHP error logging can be disabled using a simple code, if you don&#039;t require.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-12T10:58:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-27T07:17:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png\" \/>\n\t<meta property=\"og:image:width\" content=\"836\" \/>\n\t<meta property=\"og:image:height\" content=\"231\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pallavi Godse\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pallavi Godse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/\"},\"author\":{\"name\":\"Pallavi Godse\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\"},\"headline\":\"Learn to Turn Off PHP Error Reporting\",\"datePublished\":\"2020-04-12T10:58:50+00:00\",\"dateModified\":\"2026-02-27T07:17:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/\"},\"wordCount\":139,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png\",\"keywords\":[\"PHP\",\"PHP error logging\",\"php error logs\",\"php error reporting\"],\"articleSection\":[\"Website &amp; Application Management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/\",\"name\":\"Learn to Turn Off PHP Error Reporting\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png\",\"datePublished\":\"2020-04-12T10:58:50+00:00\",\"dateModified\":\"2026-02-27T07:17:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\"},\"description\":\"Websites generate PHP errors and log in error_log files in the directory but PHP error logging can be disabled using a simple code, if you don't require.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png\",\"contentUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png\",\"width\":836,\"height\":231},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn to Turn Off PHP Error Reporting\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\",\"name\":\"Pallavi Godse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g\",\"caption\":\"Pallavi Godse\"},\"description\":\"Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.\",\"sameAs\":[\"https:\/\/www.milesweb.in\"],\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/author\/pallavi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn to Turn Off PHP Error Reporting","description":"Websites generate PHP errors and log in error_log files in the directory but PHP error logging can be disabled using a simple code, if you don't require.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/","og_locale":"en_US","og_type":"article","og_title":"Learn to Turn Off PHP Error Reporting","og_description":"Websites generate PHP errors and log in error_log files in the directory but PHP error logging can be disabled using a simple code, if you don't require.","og_url":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2020-04-12T10:58:50+00:00","article_modified_time":"2026-02-27T07:17:57+00:00","og_image":[{"width":836,"height":231,"url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png","type":"image\/png"}],"author":"Pallavi Godse","twitter_misc":{"Written by":"Pallavi Godse","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#article","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/"},"author":{"name":"Pallavi Godse","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945"},"headline":"Learn to Turn Off PHP Error Reporting","datePublished":"2020-04-12T10:58:50+00:00","dateModified":"2026-02-27T07:17:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/"},"wordCount":139,"commentCount":0,"image":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png","keywords":["PHP","PHP error logging","php error logs","php error reporting"],"articleSection":["Website &amp; Application Management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/","name":"Learn to Turn Off PHP Error Reporting","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png","datePublished":"2020-04-12T10:58:50+00:00","dateModified":"2026-02-27T07:17:57+00:00","author":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945"},"description":"Websites generate PHP errors and log in error_log files in the directory but PHP error logging can be disabled using a simple code, if you don't require.","breadcrumb":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#primaryimage","url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png","contentUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/04\/file-1-min.png","width":836,"height":231},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/turn-off-php-error-reporting\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.in\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Learn to Turn Off PHP Error Reporting"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.in\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945","name":"Pallavi Godse","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g","caption":"Pallavi Godse"},"description":"Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.","sameAs":["https:\/\/www.milesweb.in"],"url":"https:\/\/www.milesweb.in\/hosting-faqs\/author\/pallavi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/9323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=9323"}],"version-history":[{"count":1,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/9323\/revisions"}],"predecessor-version":[{"id":9328,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/9323\/revisions\/9328"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=9323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=9323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=9323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}