{"id":5160,"date":"2026-07-04T11:39:31","date_gmt":"2026-07-04T11:39:31","guid":{"rendered":"https:\/\/www.copahost.com\/blog\/?p=5160"},"modified":"2026-07-04T11:43:14","modified_gmt":"2026-07-04T11:43:14","slug":"wordpress-debug","status":"publish","type":"post","link":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/","title":{"rendered":"WordPress Debug Mode (WP_DEBUG): How to Enable and Use It"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>When a WordPress site breaks \u2014 a white screen, a critical error, a plugin misbehaving \u2014 the cause is usually a PHP error you can&#8217;t see. WordPress hides these by default. Debug mode turns them back on, showing (or logging) exactly what went wrong and where. This guide explains what WordPress debug mode is, how to enable WP_DEBUG safely, how to log errors to a file, how to read what you find, and the tools that make debugging faster. The golden rule up front: debug mode is for finding problems, not for leaving on \u2014 never run it on a live site longer than you need to.<\/strong><\/p>\n\n\n\n<div style=\"display:flex; gap:14px; align-items:flex-start; background:#fff4ec; border:1px solid #f6c9a8; border-left:4px solid #F26C21; border-radius:8px; padding:16px 20px; margin:24px 0; font-family:Arial, Helvetica, sans-serif;\">\n  <div style=\"font-size:22px; flex-shrink:0; margin-top:1px;\">&#x26a0;&#xfe0f;<\/div>\n  <div style=\"flex:1;\">\n    <div style=\"font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:#c0441a; margin-bottom:6px;\">Back up first, and don&#8217;t debug live if you can help it<\/div>\n    <p style=\"color:#1A2238; line-height:1.65; margin:0;\">Editing <code style=\"background:#fde8dc;border:1px solid #f6c9a8;border-radius:4px;padding:1px 5px;font-family:monospace;color:#8c2e10;\">wp-config.php<\/code> can break your site if done wrong, so back it up first. And because debug mode can display sensitive file paths and code to visitors, run it on a staging site when possible \u2014 or at least log errors to a file instead of showing them on screen (covered below).<\/p>\n  <\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_69_1 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#What_is_WordPress_debug_mode\" title=\"What is WordPress debug mode?\">What is WordPress debug mode?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#The_WordPress_debug_constants\" title=\"The WordPress debug constants\">The WordPress debug constants<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#How_to_enable_WordPress_debug_mode\" title=\"How to enable WordPress debug mode\">How to enable WordPress debug mode<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#Method_1_Edit_wp-configphp_the_standard_way\" title=\"Method 1: Edit wp-config.php (the standard way)\">Method 1: Edit wp-config.php (the standard way)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#Method_2_Use_a_plugin_easiest_no_code\" title=\"Method 2: Use a plugin (easiest, no code)\">Method 2: Use a plugin (easiest, no code)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#Method_3_Your_hosting_panel\" title=\"Method 3: Your hosting panel\">Method 3: Your hosting panel<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#Where_to_find_the_debuglog_file\" title=\"Where to find the debug.log file\">Where to find the debug.log file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#How_to_read_the_debug_log\" title=\"How to read the debug log\">How to read the debug log<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#Debugging_tools_that_make_it_easier\" title=\"Debugging tools that make it easier\">Debugging tools that make it easier<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#Finding_slow_database_queries_with_SAVEQUERIES\" title=\"Finding slow database queries with SAVEQUERIES\">Finding slow database queries with SAVEQUERIES<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#How_to_turn_off_debug_mode\" title=\"How to turn off debug mode\">How to turn off debug mode<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#Frequently_asked_questions\" title=\"Frequently asked questions\">Frequently asked questions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#Related_guides\" title=\"Related guides\">Related guides<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#Conclusion\" title=\"Conclusion\">Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_WordPress_debug_mode\"><\/span>What is WordPress debug mode?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress debug mode is a built-in troubleshooting feature that reveals the PHP <strong>errors, warnings, and notices<\/strong> happening behind the scenes. By default WordPress suppresses these \u2014 a fatal error just shows a white screen or a generic &#8220;critical error&#8221; message, telling you nothing useful. Debug mode changes that: it reports exactly what failed, in which file, and on which line.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s controlled by a PHP constant called <strong>WP_DEBUG<\/strong> in your <code>wp-config.php<\/code> file. Off by default (<code>false<\/code>), you set it to <code>true<\/code> to turn debugging on. Developers use it constantly during plugin and theme work; site owners reach for it when something breaks and they need to know why.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Under the hood, when WP_DEBUG is true, WordPress sets PHP&#8217;s error reporting to report everything, so problems that were silently ignored become visible.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_WordPress_debug_constants\"><\/span>The WordPress debug constants<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Debug mode isn&#8217;t a single switch \u2014 it&#8217;s a small family of constants that work together. Understanding them is the key to debugging without exposing errors to your visitors.<\/p>\n\n\n\n<div style=\"margin:24px 0; overflow-x:auto; font-family:Arial, Helvetica, sans-serif;\">\n  <table style=\"width:100%; border-collapse:collapse; box-shadow:0 1px 4px rgba(0,0,0,0.12); border-radius:8px; overflow:hidden; min-width:560px;\">\n    <thead>\n      <tr style=\"background-color:#F26C21; color:#ffffff; text-align:left;\">\n        <th style=\"padding:14px 16px;\">Constant<\/th>\n        <th style=\"padding:14px 16px;\">What it does<\/th>\n      <\/tr>\n    <\/thead>\n    <tbody>\n      <tr style=\"background-color:#fbf4ef; border-bottom:1px solid #eadfd6;\">\n        <td style=\"padding:12px 16px; font-family:monospace; color:#c0441a;\">WP_DEBUG<\/td>\n        <td style=\"padding:12px 16px; color:#1A2238;\">The master switch. Set to true to turn on error reporting for the whole site.<\/td>\n      <\/tr>\n      <tr style=\"background-color:#ffffff; border-bottom:1px solid #eadfd6;\">\n        <td style=\"padding:12px 16px; font-family:monospace; color:#c0441a;\">WP_DEBUG_LOG<\/td>\n        <td style=\"padding:12px 16px; color:#1A2238;\">Saves all errors to a debug.log file in wp-content, instead of (or as well as) showing them. Requires WP_DEBUG on.<\/td>\n      <\/tr>\n      <tr style=\"background-color:#fbf4ef; border-bottom:1px solid #eadfd6;\">\n        <td style=\"padding:12px 16px; font-family:monospace; color:#c0441a;\">WP_DEBUG_DISPLAY<\/td>\n        <td style=\"padding:12px 16px; color:#1A2238;\">Controls whether errors appear on the page. Set to false to hide them from visitors while still logging.<\/td>\n      <\/tr>\n      <tr style=\"background-color:#ffffff; border-bottom:1px solid #eadfd6;\">\n        <td style=\"padding:12px 16px; font-family:monospace; color:#c0441a;\">SCRIPT_DEBUG<\/td>\n        <td style=\"padding:12px 16px; color:#1A2238;\">Loads the non-minified &#8220;dev&#8221; versions of core CSS and JavaScript. Useful when debugging front-end\/core script issues.<\/td>\n      <\/tr>\n      <tr style=\"background-color:#fbf4ef; border-bottom:none;\">\n        <td style=\"padding:12px 16px; font-family:monospace; color:#c0441a;\">SAVEQUERIES<\/td>\n        <td style=\"padding:12px 16px; color:#1A2238;\">Stores every database query (in the $wpdb->queries array) for analysis. Useful for performance debugging, but heavy \u2014 turn off when done.<\/td>\n      <\/tr>\n    <\/tbody>\n  <\/table>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">A quick note on <strong>SCRIPT_DEBUG<\/strong>: WordPress normally loads minified versions of its core CSS and JavaScript for speed. Setting <code>SCRIPT_DEBUG<\/code> to <code>true<\/code> forces it to load the full &#8220;dev&#8221; versions instead \u2014 which matters when you&#8217;re debugging a styling or script problem in core, a theme, or a plugin, and need to read the un-minified code. Most site owners never need it, but it&#8217;s invaluable for front-end development.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_enable_WordPress_debug_mode\"><\/span>How to enable WordPress debug mode<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are three ways to turn on debug mode. Pick based on how comfortable you are with code and whether you can reach the dashboard.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_1_Edit_wp-configphp_the_standard_way\"><\/span>Method 1: Edit wp-config.php (the standard way)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Connect to your site via <a href=\"https:\/\/www.copahost.com\/blog\/ftp-file-transfer\/\">FTP<\/a> or your cPanel File Manager, and open <code>wp-config.php<\/code> in the root folder. Find the line <code>define( 'WP_DEBUG', false );<\/code> and replace it with the block below. If the line isn&#8217;t there, add this <strong>above<\/strong> the line that says <code>\/* That's all, stop editing! Happy publishing. *\/<\/code>:<\/p>\n\n\n\n<div style=\"margin:16px 0; font-family:Arial, Helvetica, sans-serif;\"><div style=\"background:#1A2238; border-radius:8px; padding:16px 20px; overflow-x:auto;\"><code style=\"display:block; color:#e6edf3; font-family:'Courier New',monospace; font-size:14px; line-height:1.7; white-space:pre;\">\/\/ Enable debug mode\ndefine( 'WP_DEBUG', true );\n\n\/\/ Log errors to wp-content\/debug.log\ndefine( 'WP_DEBUG_LOG', true );\n\n\/\/ Hide errors from visitors (recommended on live sites)\ndefine( 'WP_DEBUG_DISPLAY', false );\n@ini_set( 'display_errors', 0 );<\/code><\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This is the recommended configuration: it enables debugging, writes everything to a log file, and keeps errors off the front end so visitors never see them. For a full breakdown of the file itself, see our <a href=\"https:\/\/www.copahost.com\/blog\/wp-config-php\/\">wp-config.php guide<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"714\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wp-config-wp-debug-block-1024x714.png\" alt=\"The WP_DEBUG constants in the wp-config.php file\" class=\"wp-image-5163\" srcset=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wp-config-wp-debug-block-1024x714.png 1024w, https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wp-config-wp-debug-block-300x209.png 300w, https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wp-config-wp-debug-block-768x535.png 768w, https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wp-config-wp-debug-block.png 1502w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_2_Use_a_plugin_easiest_no_code\"><\/span>Method 2: Use a plugin (easiest, no code)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you can reach your dashboard and prefer not to edit files, the free <strong>WP Debugging<\/strong> plugin (by Andy Fragen) turns debug mode on automatically when activated \u2014 it sets WP_DEBUG and WP_DEBUG_LOG to true out of the box, with a settings page under <strong>Tools \u2192 WP Debugging<\/strong>. When you&#8217;re done, just deactivate the plugin to turn debugging off. It&#8217;s the safest route for beginners.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_3_Your_hosting_panel\"><\/span>Method 3: Your hosting panel<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Some hosts include a debug toggle in their control panel, so you can enable it without touching files or plugins. Check your hosting dashboard&#8217;s WordPress tools. On Copahost, you can edit <code>wp-config.php<\/code> directly through cPanel&#8217;s File Manager using Method 1.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Where_to_find_the_debuglog_file\"><\/span>Where to find the debug.log file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once WP_DEBUG_LOG is on, WordPress writes every error to:<\/p>\n\n\n\n<div style=\"margin:16px 0; font-family:Arial, Helvetica, sans-serif;\"><div style=\"background:#1A2238; border-radius:8px; padding:16px 20px; overflow-x:auto;\"><code style=\"display:block; color:#e6edf3; font-family:'Courier New',monospace; font-size:14px; line-height:1.7; white-space:pre;\">\/wp-content\/debug.log<\/code><\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Open it through your File Manager or FTP, or download it to read in a text editor. The log only records errors that happen <strong>after<\/strong> you enable it, so if you&#8217;re chasing a specific bug, reproduce the problem (visit the broken page, repeat the action) and then check the log. Each entry includes a timestamp, the error type, and \u2014 crucially \u2014 the <strong>file path and line number<\/strong> where it occurred, which usually points straight at the offending plugin or theme.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By default the log lives at <code>\/wp-content\/debug.log<\/code>, but you can send it somewhere else \u2014 useful if you want to keep it outside the web-accessible folder for security. Instead of setting <code>WP_DEBUG_LOG<\/code> to <code>true<\/code>, give it a full file path:<\/p>\n\n\n\n<div style=\"margin:16px 0; font-family:Arial, Helvetica, sans-serif;\"><div style=\"background:#1A2238; border-radius:8px; padding:16px 20px; overflow-x:auto;\"><code style=\"display:block; color:#e6edf3; font-family:'Courier New',monospace; font-size:14px; line-height:1.7; white-space:pre;\">define( 'WP_DEBUG_LOG', '\/home\/user\/logs\/wp-errors.log' );<\/code><\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress will write the log to that path instead of the default location. Just make sure the folder exists and is writable by the web server.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"652\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-log-file-1024x652.png\" alt=\"A WordPress debug.log file showing PHP error entries with file paths\" class=\"wp-image-5162\" srcset=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-log-file-1024x652.png 1024w, https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-log-file-300x191.png 300w, https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-log-file-768x489.png 768w, https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-log-file-1536x979.png 1536w, https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-log-file.png 1571w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_read_the_debug_log\"><\/span>How to read the debug log<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The log can look intimidating, but the entries fall into a few types. Knowing which is which tells you how urgent each is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>PHP Fatal error<\/strong> \u2014 the serious one. This is what causes white screens and critical errors; it stops the site. The message names the file and line, which usually identifies the exact plugin or theme at fault.<\/li>\n\n\n\n<li><strong>PHP Warning<\/strong> \u2014 something unexpected happened but PHP kept running. Warnings don&#8217;t crash the site alone, but often flag a bug that could become fatal under other conditions.<\/li>\n\n\n\n<li><strong>PHP Notice<\/strong> \u2014 a minor issue like an undefined variable. Usually harmless in production, but thousands of the same notice per load can signal a performance problem.<\/li>\n\n\n\n<li><strong>WordPress database error<\/strong> \u2014 a line starting with &#8220;WordPress database error&#8221; means a query failed, typically from a plugin generating bad SQL.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In practice, scan for <strong>Fatal error<\/strong> first \u2014 that&#8217;s what&#8217;s breaking the site. The file path in that line is your prime suspect; deactivate that plugin or switch that theme to confirm.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The debug.log isn&#8217;t the only log worth checking. Your server keeps its own error logs too, and reading both gives a fuller picture of what&#8217;s failing. For a complete walkthrough of every log WordPress and your server produce \u2014 and how to read them \u2014 see our guide to <a href=\"https:\/\/www.copahost.com\/blog\/wordpress-error-logs\/\">WordPress error logs<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s also worth knowing that you don&#8217;t always need WP_DEBUG to see errors. Most hosts capture PHP errors in a server-level <code>error_log<\/code> file, accessible from your hosting panel \u2014 on Copahost, through cPanel&#8217;s metrics\/logs section. If you can&#8217;t or don&#8217;t want to enable debug mode, that server log is often enough to identify a fatal error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Debugging_tools_that_make_it_easier\"><\/span>Debugging tools that make it easier<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Beyond the raw log, a few free tools give you a friendlier view:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Query Monitor<\/strong> \u2014 the most powerful free debugging plugin. It adds a panel showing database queries, PHP errors, hooks, HTTP requests, and more, all in the admin bar. Indispensable for performance and development work.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/query-monitor-plugin-panel-1024x683.png\" alt=\"The Query Monitor plugin panel showing debugging information\" class=\"wp-image-5164\" srcset=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/query-monitor-plugin-panel-1024x683.png 1024w, https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/query-monitor-plugin-panel-300x200.png 300w, https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/query-monitor-plugin-panel-768x512.png 768w, https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/query-monitor-plugin-panel.png 1536w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Debug Bar<\/strong> \u2014 adds a debug menu to the admin bar with query, cache, and request info; tracks PHP warnings and notices when WP_DEBUG is on.<\/li>\n\n\n\n<li><strong>Health Check &amp; Troubleshooting<\/strong> \u2014 lets you disable plugins and themes for <em>your session only<\/em>, so you can isolate a conflict without taking the live site down for visitors.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Finding_slow_database_queries_with_SAVEQUERIES\"><\/span>Finding slow database queries with SAVEQUERIES<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If your site is slow rather than broken, the <code>SAVEQUERIES<\/code> constant helps you find the culprit. When enabled in <code>wp-config.php<\/code>, WordPress records every database query \u2014 along with how long each took and what called it \u2014 in an array you can inspect:<\/p>\n\n\n\n<div style=\"margin:16px 0; font-family:Arial, Helvetica, sans-serif;\"><div style=\"background:#1A2238; border-radius:8px; padding:16px 20px; overflow-x:auto;\"><code style=\"display:block; color:#e6edf3; font-family:'Courier New',monospace; font-size:14px; line-height:1.7; white-space:pre;\">define( 'SAVEQUERIES', true );<\/code><\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">With it on, you can print the query list (the <code>$wpdb->queries<\/code> array) in a template or with a snippet to see which queries are slow and which plugin triggered them. Because logging every query adds overhead, only enable SAVEQUERIES while investigating, and turn it off afterward. For most people, the Query Monitor plugin (below) presents this same data in a far friendlier way.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_turn_off_debug_mode\"><\/span>How to turn off debug mode<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This step matters as much as turning it on. Leaving debug mode active on a live site is both a <strong>security risk<\/strong> (it can expose file paths and code) and a <strong>performance drain<\/strong> (the log file grows indefinitely and eats disk space). When you&#8217;re done troubleshooting:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set <code>WP_DEBUG<\/code>, <code>WP_DEBUG_LOG<\/code>, and <code>WP_DEBUG_DISPLAY<\/code> back to <code>false<\/code> (or remove the lines) in <code>wp-config.php<\/code> \u2014 or deactivate the WP Debugging plugin if you used Method 2.<\/li>\n\n\n\n<li>Delete the <code>debug.log<\/code> file from <code>wp-content<\/code>, since it can contain sensitive information and may have grown large.<\/li>\n<\/ul>\n\n\n\n<div style=\"display:flex; gap:14px; align-items:flex-start; background:#eef1f8; border:1px solid #b9c2dd; border-left:4px solid #1A2238; border-radius:8px; padding:16px 20px; margin:24px 0; font-family:Arial, Helvetica, sans-serif;\">\n  <div style=\"font-size:22px; flex-shrink:0; margin-top:1px;\">&#x1f4a1;<\/div>\n  <div style=\"flex:1;\">\n    <div style=\"font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:#1A2238; margin-bottom:6px;\">debug.log not appearing?<\/div>\n    <p style=\"color:#1A2238; line-height:1.65; margin:0;\">If the file never gets created, check a few things: <code style=\"background:#fff;border:1px solid #b9c2dd;border-radius:4px;padding:1px 5px;font-family:monospace;color:#1A2238;\">WP_DEBUG<\/code> must be <code style=\"background:#fff;border:1px solid #b9c2dd;border-radius:4px;padding:1px 5px;font-family:monospace;color:#1A2238;\">true<\/code> for WP_DEBUG_LOG to work; the <code style=\"background:#fff;border:1px solid #b9c2dd;border-radius:4px;padding:1px 5px;font-family:monospace;color:#1A2238;\">wp-content<\/code> folder needs to be writable (permission 755); and a server-level <code style=\"background:#fff;border:1px solid #b9c2dd;border-radius:4px;padding:1px 5px;font-family:monospace;color:#1A2238;\">display_errors Off<\/code> in php.ini or a must-use plugin can sometimes suppress output. Also remember the log only records errors that occur after you enable it.<\/p>\n  <\/div>\n<\/div>\n\n\n\n<div style=\"max-width:760px; margin:32px auto; background:linear-gradient(135deg,#F26C21 0%,#1A2238 100%); border-radius:16px; padding:32px 28px; font-family:Arial, Helvetica, sans-serif; color:#fff; box-shadow:0 10px 30px rgba(242,108,33,.25);\">\n  <div style=\"display:flex; align-items:flex-start; gap:16px; flex-wrap:wrap;\">\n    <div style=\"flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:52px; height:52px; border-radius:12px; background:rgba(255,255,255,.18);\">\n      <svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83\"><\/path><\/svg>\n    <\/div>\n    <div style=\"flex:1 1 320px; min-width:260px;\">\n      <div style=\"font-weight:800; line-height:1.25; margin-bottom:8px;\">Debugging is easier with the right hosting<\/div>\n      <p style=\"margin:0 0 18px; line-height:1.6; color:#ffe4d3;\">Copahost gives you cPanel and FTP access to edit wp-config.php, error logs to diagnose issues, and support that helps when a plugin or theme breaks your site. Everything you need to find and fix errors fast.<\/p>\n      <a href=\"https:\/\/www.copahost.com\/web-hosting\/\" style=\"display:inline-flex; align-items:center; gap:8px; background:#fff; color:#F26C21; font-weight:700; text-decoration:none; padding:13px 26px; border-radius:10px; box-shadow:0 4px 12px rgba(0,0,0,.15);\">\n        See web hosting plans\n        <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#F26C21\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14M13 6l6 6-6 6\"><\/path><\/svg>\n      <\/a>\n    <\/div>\n  <\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Frequently_asked_questions\"><\/span>Frequently asked questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What is WP_DEBUG in WordPress?<\/strong><br>WP_DEBUG is a PHP constant in the wp-config.php file that turns on WordPress debug mode. When set to true, WordPress reports all PHP errors, warnings, and notices instead of hiding them, which helps you find what&#8217;s breaking your site. It&#8217;s false by default.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>How do I enable debug mode in WordPress?<\/strong><br>Edit wp-config.php and set define(&#8216;WP_DEBUG&#8217;, true);. To log errors to a file without showing them to visitors, also add WP_DEBUG_LOG as true and WP_DEBUG_DISPLAY as false. Alternatively, use the free WP Debugging plugin, which enables it without editing files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Where is the WordPress debug log stored?<\/strong><br>In the file \/wp-content\/debug.log, once you&#8217;ve enabled WP_DEBUG_LOG. You can open it through your File Manager or FTP, or download it to read in a text editor. It only records errors that happen after you turn logging on.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Is it safe to leave WP_DEBUG on?<\/strong><br>No. On a live site, debug mode can expose file paths and code to visitors (a security risk) and the log file grows indefinitely (wasting disk space). Enable it only while troubleshooting, then set the constants back to false and delete the debug.log file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why is my debug.log file not being created?<\/strong><br>WP_DEBUG must be true for WP_DEBUG_LOG to work, and the wp-content folder must be writable. A server-level display_errors setting or a must-use plugin can also suppress it. Remember the log only captures errors that occur after enabling it, so reproduce the problem first.<\/p>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\"@type\":\"Question\",\"name\":\"What is WP_DEBUG in WordPress?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"WP_DEBUG is a PHP constant in the wp-config.php file that turns on WordPress debug mode. When set to true, WordPress reports all PHP errors, warnings, and notices instead of hiding them, which helps you find what is breaking your site. It is false by default.\"}},\n    {\"@type\":\"Question\",\"name\":\"How do I enable debug mode in WordPress?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Edit wp-config.php and set define WP_DEBUG true. To log errors to a file without showing them to visitors, also add WP_DEBUG_LOG as true and WP_DEBUG_DISPLAY as false. Alternatively, use the free WP Debugging plugin, which enables it without editing files.\"}},\n    {\"@type\":\"Question\",\"name\":\"Where is the WordPress debug log stored?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"In the file wp-content\/debug.log, once you have enabled WP_DEBUG_LOG. You can open it through your File Manager or FTP, or download it to read in a text editor. It only records errors that happen after you turn logging on.\"}},\n    {\"@type\":\"Question\",\"name\":\"Is it safe to leave WP_DEBUG on?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No. On a live site, debug mode can expose file paths and code to visitors, a security risk, and the log file grows indefinitely, wasting disk space. Enable it only while troubleshooting, then set the constants back to false and delete the debug.log file.\"}},\n    {\"@type\":\"Question\",\"name\":\"Why is my debug.log file not being created?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"WP_DEBUG must be true for WP_DEBUG_LOG to work, and the wp-content folder must be writable. A server-level display_errors setting or a must-use plugin can also suppress it. Remember the log only captures errors that occur after enabling it, so reproduce the problem first.\"}}\n  ]\n}\n<\/script>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Related_guides\"><\/span>Related guides<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Debugging connects to several WordPress topics \u2014 see our guides on the <a href=\"https:\/\/www.copahost.com\/blog\/wp-config-php\/\">wp-config.php file<\/a>, the <a href=\"https:\/\/www.copahost.com\/blog\/wordpress-white-screen-of-death\/\">white screen of death<\/a>, the <a href=\"https:\/\/www.copahost.com\/blog\/there-has-been-a-critical-error-on-this-website\/\">critical error<\/a>, and our hub of <a href=\"https:\/\/www.copahost.com\/blog\/common-wordpress-errors\/\">common WordPress errors<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress debug mode is the fastest way to turn a mysterious white screen into a specific, fixable error. Enable <code>WP_DEBUG<\/code> (ideally with <code>WP_DEBUG_LOG<\/code> on and <code>WP_DEBUG_DISPLAY<\/code> off so visitors never see the errors), reproduce the problem, and read the log \u2014 the file path in a fatal error usually names the plugin or theme at fault. Tools like Query Monitor make the process even easier. Just remember the one rule that protects your site: debug mode is a temporary tool. Turn it off and delete the log the moment you&#8217;re done.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When a WordPress site breaks \u2014 a white screen, a critical error, a plugin misbehaving \u2014 the cause is usually a PHP error you can&#8217;t see. WordPress hides these by default. Debug mode turns them back on, showing (or logging) exactly what went wrong and where. This guide explains what WordPress debug mode is, how [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5161,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60],"tags":[],"class_list":["post-5160","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WordPress Debug Mode (WP_DEBUG): How to Enable and Use It - Copahost<\/title>\n<meta name=\"description\" content=\"WordPress debug mode reveals the PHP errors behind a broken site. Learn how to enable WP_DEBUG, log errors to debug.log, read them, and the tools that make it easier.\" \/>\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.copahost.com\/blog\/wordpress-debug\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress Debug Mode (WP_DEBUG): How to Enable and Use It - Copahost\" \/>\n<meta property=\"og:description\" content=\"WordPress debug mode reveals the PHP errors behind a broken site. Learn how to enable WP_DEBUG, log errors to debug.log, read them, and the tools that make it easier.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/\" \/>\n<meta property=\"og:site_name\" content=\"Copahost\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-04T11:39:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-04T11:43:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-mode-cover.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1672\" \/>\n\t<meta property=\"og:image:height\" content=\"941\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Gustavo Gallas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gustavo Gallas\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/\"},\"author\":{\"name\":\"Gustavo Gallas\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246\"},\"headline\":\"WordPress Debug Mode (WP_DEBUG): How to Enable and Use It\",\"datePublished\":\"2026-07-04T11:39:31+00:00\",\"dateModified\":\"2026-07-04T11:43:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/\"},\"wordCount\":2010,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-mode-cover.png\",\"articleSection\":[\"Wordpress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/\",\"url\":\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/\",\"name\":\"WordPress Debug Mode (WP_DEBUG): How to Enable and Use It - Copahost\",\"isPartOf\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-mode-cover.png\",\"datePublished\":\"2026-07-04T11:39:31+00:00\",\"dateModified\":\"2026-07-04T11:43:14+00:00\",\"description\":\"WordPress debug mode reveals the PHP errors behind a broken site. Learn how to enable WP_DEBUG, log errors to debug.log, read them, and the tools that make it easier.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#primaryimage\",\"url\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-mode-cover.png\",\"contentUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-mode-cover.png\",\"width\":1672,\"height\":941,\"caption\":\"Wordpress Debug Mode cover\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.copahost.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress Debug Mode (WP_DEBUG): How to Enable and Use It\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#website\",\"url\":\"https:\/\/www.copahost.com\/blog\/\",\"name\":\"Copahost\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.copahost.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\",\"name\":\"Copahost\",\"url\":\"https:\/\/www.copahost.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png\",\"contentUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png\",\"width\":223,\"height\":40,\"caption\":\"Copahost\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246\",\"name\":\"Gustavo Gallas\",\"description\":\"Graduated in Computing at PUC-Rio, Brazil. Specialized in IT, networking, systems administration and human and organizational development\u200b. Also have brewing skills.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/gustavo-gallas-107926196\/\"],\"url\":\"https:\/\/www.copahost.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress Debug Mode (WP_DEBUG): How to Enable and Use It - Copahost","description":"WordPress debug mode reveals the PHP errors behind a broken site. Learn how to enable WP_DEBUG, log errors to debug.log, read them, and the tools that make it easier.","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.copahost.com\/blog\/wordpress-debug\/","og_locale":"en_US","og_type":"article","og_title":"WordPress Debug Mode (WP_DEBUG): How to Enable and Use It - Copahost","og_description":"WordPress debug mode reveals the PHP errors behind a broken site. Learn how to enable WP_DEBUG, log errors to debug.log, read them, and the tools that make it easier.","og_url":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/","og_site_name":"Copahost","article_published_time":"2026-07-04T11:39:31+00:00","article_modified_time":"2026-07-04T11:43:14+00:00","og_image":[{"width":1672,"height":941,"url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-mode-cover.png","type":"image\/png"}],"author":"Gustavo Gallas","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Gustavo Gallas","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#article","isPartOf":{"@id":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/"},"author":{"name":"Gustavo Gallas","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246"},"headline":"WordPress Debug Mode (WP_DEBUG): How to Enable and Use It","datePublished":"2026-07-04T11:39:31+00:00","dateModified":"2026-07-04T11:43:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/"},"wordCount":2010,"commentCount":0,"publisher":{"@id":"https:\/\/www.copahost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#primaryimage"},"thumbnailUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-mode-cover.png","articleSection":["Wordpress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.copahost.com\/blog\/wordpress-debug\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/","url":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/","name":"WordPress Debug Mode (WP_DEBUG): How to Enable and Use It - Copahost","isPartOf":{"@id":"https:\/\/www.copahost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#primaryimage"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#primaryimage"},"thumbnailUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-mode-cover.png","datePublished":"2026-07-04T11:39:31+00:00","dateModified":"2026-07-04T11:43:14+00:00","description":"WordPress debug mode reveals the PHP errors behind a broken site. Learn how to enable WP_DEBUG, log errors to debug.log, read them, and the tools that make it easier.","breadcrumb":{"@id":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.copahost.com\/blog\/wordpress-debug\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#primaryimage","url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-mode-cover.png","contentUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2026\/07\/wordpress-debug-mode-cover.png","width":1672,"height":941,"caption":"Wordpress Debug Mode cover"},{"@type":"BreadcrumbList","@id":"https:\/\/www.copahost.com\/blog\/wordpress-debug\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.copahost.com\/blog\/"},{"@type":"ListItem","position":2,"name":"WordPress Debug Mode (WP_DEBUG): How to Enable and Use It"}]},{"@type":"WebSite","@id":"https:\/\/www.copahost.com\/blog\/#website","url":"https:\/\/www.copahost.com\/blog\/","name":"Copahost","description":"","publisher":{"@id":"https:\/\/www.copahost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.copahost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.copahost.com\/blog\/#organization","name":"Copahost","url":"https:\/\/www.copahost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png","contentUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png","width":223,"height":40,"caption":"Copahost"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246","name":"Gustavo Gallas","description":"Graduated in Computing at PUC-Rio, Brazil. Specialized in IT, networking, systems administration and human and organizational development\u200b. Also have brewing skills.","sameAs":["https:\/\/www.linkedin.com\/in\/gustavo-gallas-107926196\/"],"url":"https:\/\/www.copahost.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/5160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/comments?post=5160"}],"version-history":[{"count":2,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/5160\/revisions"}],"predecessor-version":[{"id":5168,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/5160\/revisions\/5168"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/media\/5161"}],"wp:attachment":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/media?parent=5160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/categories?post=5160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/tags?post=5160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}