{"id":55855,"date":"2015-10-15T04:01:37","date_gmt":"2015-10-15T08:01:37","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=55855"},"modified":"2017-07-13T07:02:11","modified_gmt":"2017-07-13T11:02:11","slug":"wordpress-how-to-hide-php-warnings-and-notices","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/wordpress-how-to-hide-php-warnings-and-notices.html","title":{"rendered":"WordPress. How to hide PHP warnings and notices"},"content":{"rendered":"<p>\r\n<p>This tutorial will show you how to hide <strong>PHP<\/strong> warnings and notices in <strong>WordPress<\/strong>.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=47ttVYEvehc?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to hide PHP warnings and notices<\/a><\/p>\r\n<p>For example this warning at the frontend: <\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-1.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-1-300x32.png\" alt=\"WordPress-How_to_hide_PHP_warnings_and_notices-1\" width=\"300\" height=\"32\" class=\"aligncenter size-medium wp-image-55856\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-1-300x32.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-1-150x16.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-1-1024x110.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-1.png 1147w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<ol>\r\n<li>\r\n<p>Log into the <strong>Host Control Panel <\/strong>(<strong>Cpanel<\/strong>). Go to <strong>File Manager<\/strong> (or you can connect to <strong>FTP<\/strong>):<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-2.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-2-300x272.png\" alt=\"WordPress-How_to_hide_PHP_warnings_and_notices-2\" width=\"300\" height=\"272\" class=\"aligncenter size-medium wp-image-55857\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-2-300x272.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-2-150x136.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-2.png 532w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>Get to the root directory of the website, open <strong>wp-config.php<\/strong> file:<\/p>\r\n<div class=\"inline-banner\">\r\n<a href=\"https:\/\/www.templatemonster.com\/service-center\/\">\r\n<img src=\"\/help\/files\/banners\/inline\/Banner-3-(835-x100).jpg\" \/>\r\n<\/a>\r\n<\/div>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-3.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-3-300x136.png\" alt=\"WordPress-How_to_hide_PHP_warnings_and_notices-3\" width=\"300\" height=\"136\" class=\"aligncenter size-medium wp-image-55858\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-3-300x136.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-3-150x68.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-3.png 956w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n  <\/li>\r\n<li>\r\n<p>In this file, we will search for:<\/p>\r\n<pre class=\"brush:php\">\r\n define('WP_DEBUG', false);\r\n<\/pre>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-4.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-4-300x159.png\" alt=\"WordPress-How_to_hide_PHP_warnings_and_notices-4\" width=\"300\" height=\"159\" class=\"aligncenter size-medium wp-image-55859\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-4-300x159.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-4-150x79.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-4.png 599w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>We will replace this piece of codes with: <\/p>\r\n<pre class=\"brush:php\">\r\nini_set('log_errors','On');\r\nini_set('display_errors','Off');\r\nini_set('error_reporting', E_ALL );\r\ndefine('WP_DEBUG', false);\r\ndefine('WP_DEBUG_LOG', true);\r\ndefine('WP_DEBUG_DISPLAY', false);\r\n<\/pre>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-5.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-5-300x186.png\" alt=\"WordPress-How_to_hide_PHP_warnings_and_notices-5\" width=\"300\" height=\"186\" class=\"aligncenter size-medium wp-image-55860\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-5-300x186.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-5-150x93.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/WordPress-How_to_hide_PHP_warnings_and_notices-5.png 640w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p><strong>Save<\/strong> the file.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>Refresh the page to check the result.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=47ttVYEvehc?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to hide PHP warnings and notices<\/a><\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to hide <strong>PHP<\/strong> warnings and notices in<strong> WordPress<\/strong>.<\/p>\n","protected":false},"author":69,"featured_media":55862,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[728],"tags":[1301,1151,911,690,2405],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/55855"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/69"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=55855"}],"version-history":[{"count":1,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/55855\/revisions"}],"predecessor-version":[{"id":81990,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/55855\/revisions\/81990"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/55862"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=55855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=55855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=55855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}