{"id":1078,"date":"2021-04-19T06:37:51","date_gmt":"2021-04-19T06:37:51","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2021\/04\/19\/5157262-how-to-enable-wp_debug-at-hostinger\/"},"modified":"2026-08-12T06:50:38","modified_gmt":"2026-08-12T06:50:38","slug":"5157262-how-to-enable-wp_debug-at-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/5157262-how-to-enable-wp_debug-at-hostinger\/","title":{"rendered":"How to enable WP_DEBUG at Hostinger"},"content":{"rendered":"<p>The WordPress debugging mode helps you identify, track, and understand errors occurring on your website. This guide explains how to enable error debugging and configure error logs using the Hostinger File Manager.<\/p><h3>Before you start<\/h3><ul>\n<li>This guide applies to web, cloud, and agency hosting.<\/li>\n<li>For WordPress websites on agency hosting, you must first enable <code>wp-config.php<\/code> editing.\n<ul>\n<li>Go to hPanel &rarr; <a href=\"https:\/\/hpanel.hostinger.com\/websites\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Websites<\/span><\/a>.<\/li>\n<li>Click <strong>Dashboard<\/strong> next to the website.<\/li>\n<li>On the sidebar, go to Files &rarr; <strong>File Manager<\/strong>.<\/li>\n<li>Locate the <strong>Editing permission<\/strong> option an, if locked, click on the toggle to unlock it.<br>\n<img decoding=\"async\" class=\"aligncenter wp-image-10866\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/hsotinger-agency-editing-permissions-toggle.png\" alt=\"\" width=\"701\" height=\"373\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/hsotinger-agency-editing-permissions-toggle.png 848w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/hsotinger-agency-editing-permissions-toggle-300x160.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/hsotinger-agency-editing-permissions-toggle-768x408.png 768w\" sizes=\"(max-width: 701px) 100vw, 701px\" \/><\/li>\n<li>It is recommended to lock it again after making the changes.<\/li>\n<\/ul>\n<\/li>\n<\/ul><h2 id=\"h-step-1-access-the-wp-config-php-file\">Step 1 &ndash; Access the wp-config.php file<\/h2><ol>\n<li>Open the <a href=\"https:\/\/www.hostinger.com\/support\/4548688-basic-actions-in-the-file-manager-in-hostinger\/\">file manager<\/a> for your website.<\/li>\n<li>Navigate to the <code>public_html<\/code> directory of your domain.<\/li>\n<li>Locate the <code>wp-config.php<\/code> file within the folder structure.<br>\n<img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2021\/04\/a5637994-d790-4df8-a871-6e8028c3cad9.jpg\" alt=\"Hostinger file manager showing public_html path and wp-config.php highlighted\" data-media-id=\"4313\"><\/li>\n<\/ol><h2 id=\"h-step-2-enable-wp_debug\">Step 2 &ndash; Enable WP_DEBUG<\/h2><ol>\n<li>Right-click the wp-config.php file and select Edit.<\/li>\n<li>Search for the line containing WP_DEBUG:\n<pre>define( 'WP_DEBUG', false );<\/pre>\n<\/li>\n<li>Change the value from false to true:\n<pre>define( 'WP_DEBUG', true );<\/pre>\n<p><img decoding=\"async\" style=\"font-family: Verdana, Arial, Helvetica, sans-serif\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2021\/04\/40e4f792-90ea-463a-b9a7-48462e8dab5b.jpg\" alt=\"Hostinger file editor showing wp-config.php with define('WP_DEBUG', true); highlighted\" data-media-id=\"4314\"><\/p><\/li>\n<li>If this line does not exist in the file, add that code block directly above the line that reads\n<pre>\/* That's all, stop editing! Happy publishing. *\/<\/pre>\n<\/li>\n<li>Save the changes to the file.<\/li>\n<\/ol><h2 id=\"h-log-website-errors-privately\">Log website errors privately<\/h2><p>To keep track of historical error data without displaying technical error messages publicly to website visitors, you can enable error logging and disable the error display.<\/p><ol>\n<li>Open the <code>wp-config.php<\/code> file for editing.<\/li>\n<li>Add the following lines directly below the line that enables WP_DEBUG:<\/li>\n<\/ol><pre>define( 'WP_DEBUG_LOG', __DIR__ . '\/wp-content\/debug.txt' );\r\ndefine( 'WP_DEBUG_DISPLAY', false );<\/pre><p>And save the changes.<\/p><p>The website configuration will now record all background errors silently without disrupting the visitor experience. The generated error log file is saved as <strong>debug.txt<\/strong> inside the <strong>wp-content<\/strong> directory, so you can access and download it directly from File Manager.<\/p><p class=\"no-margin\"><strong>Additional resources<\/strong><\/p><ul>\n<li><a href=\"https:\/\/www.hostinger.com\/tutorials\/debug-wordpress\/\">WordPress debug: a comprehensive guide<\/a><\/li>\n<li><a href=\"https:\/\/www.hostinger.com\/support\/1583187-how-to-fix-500-internal-server-error-at-hostinger\/\">How to fix 500 Internal Server Error at Hostinger<\/a><\/li>\n<li><a href=\"https:\/\/www.hostinger.com\/support\/3313359-how-to-find-the-website-s-configuration-file-at-hostinger\/\">How to find the website&rsquo;s configuration file at Hostinger<\/a><\/li>\n<\/ul><div class=\"intercom-h2b-video\">\n<p><iframe title=\"How to Check Your WordPress Error Log\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/Ypt5lLkGXo4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Enable the WordPress debugging tool to troubleshoot and resolve website errors on your Hostinger hosting plan<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[179],"tags":[],"class_list":["post-1078","post","type-post","status-publish","format-standard","hentry","category-wordpress-management"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/5157262-how-to-enable-wp_debug-at-hostinger\/","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/5157262-como-activar-wp_debug-en-hostinger\/","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/5157262-comment-activer-wp_debug-chez-hostinger\/","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/5157262-cara-mengaktifkan-wp_debug-di-hostinger\/","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/support\/5157262-como-habilitar-o-wp_debug-na-hostinger\/","default":0},{"locale":"uk-UA","link":"https:\/\/www.hostinger.com\/ua\/support\/5157262---wp_debug--hostinger\/","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=1078"}],"version-history":[{"count":12,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1078\/revisions"}],"predecessor-version":[{"id":15405,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1078\/revisions\/15405"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=1078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=1078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=1078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}