{"id":15717,"date":"2020-01-29T22:30:25","date_gmt":"2020-01-29T21:30:25","guid":{"rendered":"https:\/\/www.wp-amazon-plugin.com\/?post_type=knowledgebase&#038;p=15717"},"modified":"2022-04-15T11:47:29","modified_gmt":"2022-04-15T09:47:29","slug":"how-to-activate-the-wordpress-debug-mode","status":"publish","type":"knowledgebase","link":"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/misc\/how-to-activate-the-wordpress-debug-mode\/","title":{"rendered":"How to activate the WordPress Debug Mode"},"content":{"rendered":"<p>WordPress has a special debug mode that can be used to log error messages of the server-side scripting language PHP, in which much of the WordPress logic is programmed.<\/p>\n<p>By default the mode is not activated and this is a fine, because it should only be switched on for troubleshooting and then switched off again.<\/p>\n<h2>Activating the Debug Mode<\/h2>\n<p>To activate the debug mode, open your configuration file <code>wp-config.php<\/code> in the root directory of your site in a text editor. Scroll down to this line:<\/p>\n<div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">define('WP_DEBUG', false);<\/pre>\n<\/div>\n<p>The <code>false<\/code>\u00a0means that the mode is not activated.<\/p>\n<p>Replace this line with the following:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">define('WP_DEBUG', true);\r\ndefine('WP_DEBUG_LOG', true);\r\ndefine('WP_DEBUG_DISPLAY', false);<\/pre>\n<h3>Explanation<\/h3>\n<p><code>WP_DEBUG<\/code><\/p>\n<p>Setting this to <code>true<\/code> switches the mode on in general. Important in this context are the two new values.<\/p>\n<p><code>WP_DEBUG_LOG<\/code><\/p>\n<p>If set to <code>true<\/code>, <code>WP_DEBUG_LOG<\/code> ensures that any error messages that occur are logged in a <strong>server-side file<\/strong>. The file is created in the <code>wp-content<\/code>\u00a0directory of your site with the default name <code>debug.log<\/code>. So make sure that this directory is writable for the PHP process or create the file manually and give it write permission (664).<\/p>\n<p><code>WP_DEBUG_DISPLAY<\/code><\/p>\n<p>For a <strong>productive site<\/strong> it is <strong>very important<\/strong> to set the third value <code>WP_DEBUG_DISPLAY<\/code> to <code>false<\/code>, because it ensures that the error messages are <strong>not displayed in the frontend<\/strong> of your site.<\/p>\n<div>\n<h2>Deactivating the Debug Mode<\/h2>\n<p>When the debugging is finished, it is important to switch off the debug mode again. Otherwise the log file would continue to be bloated with unnecessary entries.<\/p>\n<p>To switch off the WordPress debug mode, set the value <code>WP_DEBUG<\/code> back to <code>false<\/code>\u00a0as in the initial state.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">define('WP_DEBUG', false);<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Short URL: <a href=\"http:\/\/bit.ly\/asa2-wp-debug-mode\">http:\/\/bit.ly\/asa2-wp-debug-mode<\/a><\/p>\n<p>Check out more <a href=\"http:\/\/wpglob.com\" target=\"_blank\" rel=\"noopener\">WordPress Tutorials<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress has a special debug mode that can be used to log error messages of the server-side scripting language PHP, in which much of the WordPress logic is programmed. By default the mode is not activated and this is a fine, because it should only be switched on for troubleshooting and then switched off again. Activating the Debug Mode To &#8230; <\/p>\n<div><a href=\"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/misc\/how-to-activate-the-wordpress-debug-mode\/\" class=\"more-link\">Read More<\/a><\/div>\n","protected":false},"author":1170,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","knowledgebase_cat":[241],"class_list":["post-15717","knowledgebase","type-knowledgebase","status-publish","hentry","knowledgebase_cat-misc","no-post-thumbnail"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to activate the WordPress Debug Mode - Amazon Simple Affiliate<\/title>\n<meta name=\"description\" content=\"To find an error on a WordPress page, it is important to activate the debug mode and read the error messages in the log file debug.log.\" \/>\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.wp-amazon-plugin.com\/knowledge-base\/asa2\/misc\/how-to-activate-the-wordpress-debug-mode\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to activate the WordPress Debug Mode - Amazon Simple Affiliate\" \/>\n<meta property=\"og:description\" content=\"To find an error on a WordPress page, it is important to activate the debug mode and read the error messages in the log file debug.log.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wp-amazon-plugin.com\/knowledge-base\/asa2\/misc\/how-to-activate-the-wordpress-debug-mode\/\" \/>\n<meta property=\"og:site_name\" content=\"Amazon Simple Affiliate\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpasa2\/\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-15T09:47:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/d1uajaf4ht87ft.cloudfront.net\/wp-content\/uploads\/2017\/12\/04220936\/asa2-logo-400.png\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ifeelwebde\" \/>\n<meta name=\"twitter:label1\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data1\" content=\"2\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wp-amazon-plugin.com\\\/knowledge-base\\\/asa2\\\/misc\\\/how-to-activate-the-wordpress-debug-mode\\\/\",\"url\":\"https:\\\/\\\/www.wp-amazon-plugin.com\\\/knowledge-base\\\/asa2\\\/misc\\\/how-to-activate-the-wordpress-debug-mode\\\/\",\"name\":\"How to activate the WordPress Debug Mode - Amazon Simple Affiliate\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wp-amazon-plugin.com\\\/#website\"},\"datePublished\":\"2020-01-29T21:30:25+00:00\",\"dateModified\":\"2022-04-15T09:47:29+00:00\",\"description\":\"To find an error on a WordPress page, it is important to activate the debug mode and read the error messages in the log file debug.log.\",\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wp-amazon-plugin.com\\\/knowledge-base\\\/asa2\\\/misc\\\/how-to-activate-the-wordpress-debug-mode\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wp-amazon-plugin.com\\\/#website\",\"url\":\"https:\\\/\\\/www.wp-amazon-plugin.com\\\/\",\"name\":\"Amazon Simple Affiliate\",\"description\":\"Upgrade your WordPress Affiliate skills!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wp-amazon-plugin.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to activate the WordPress Debug Mode - Amazon Simple Affiliate","description":"To find an error on a WordPress page, it is important to activate the debug mode and read the error messages in the log file debug.log.","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.wp-amazon-plugin.com\/knowledge-base\/asa2\/misc\/how-to-activate-the-wordpress-debug-mode\/","og_locale":"de_DE","og_type":"article","og_title":"How to activate the WordPress Debug Mode - Amazon Simple Affiliate","og_description":"To find an error on a WordPress page, it is important to activate the debug mode and read the error messages in the log file debug.log.","og_url":"https:\/\/www.wp-amazon-plugin.com\/knowledge-base\/asa2\/misc\/how-to-activate-the-wordpress-debug-mode\/","og_site_name":"Amazon Simple Affiliate","article_publisher":"https:\/\/www.facebook.com\/wpasa2\/","article_modified_time":"2022-04-15T09:47:29+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/d1uajaf4ht87ft.cloudfront.net\/wp-content\/uploads\/2017\/12\/04220936\/asa2-logo-400.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@ifeelwebde","twitter_misc":{"Gesch\u00e4tzte Lesezeit":"2\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wp-amazon-plugin.com\/knowledge-base\/asa2\/misc\/how-to-activate-the-wordpress-debug-mode\/","url":"https:\/\/www.wp-amazon-plugin.com\/knowledge-base\/asa2\/misc\/how-to-activate-the-wordpress-debug-mode\/","name":"How to activate the WordPress Debug Mode - Amazon Simple Affiliate","isPartOf":{"@id":"https:\/\/www.wp-amazon-plugin.com\/#website"},"datePublished":"2020-01-29T21:30:25+00:00","dateModified":"2022-04-15T09:47:29+00:00","description":"To find an error on a WordPress page, it is important to activate the debug mode and read the error messages in the log file debug.log.","inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wp-amazon-plugin.com\/knowledge-base\/asa2\/misc\/how-to-activate-the-wordpress-debug-mode\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.wp-amazon-plugin.com\/#website","url":"https:\/\/www.wp-amazon-plugin.com\/","name":"Amazon Simple Affiliate","description":"Upgrade your WordPress Affiliate skills!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wp-amazon-plugin.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"}]}},"_links":{"self":[{"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/knowledgebase\/15717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/types\/knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/users\/1170"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/comments?post=15717"}],"version-history":[{"count":10,"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/knowledgebase\/15717\/revisions"}],"predecessor-version":[{"id":16649,"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/knowledgebase\/15717\/revisions\/16649"}],"wp:attachment":[{"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/media?parent=15717"}],"wp:term":[{"taxonomy":"knowledgebase_cat","embeddable":true,"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/knowledgebase_cat?post=15717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}