{"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-11-05T10:16:05","modified_gmt":"2026-11-05T10:16:05","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>\n<h3>Before you start<\/h3>\n<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 Hostinger dashboard \u2192 <a data-click-id=\"hgr-post-content-link-websites\" href=\"https:\/\/hpanel.hostinger.com\/websites\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Websites<\/span><\/a>.<\/li>\n<li>Hover over the website and click <strong>Manage site.<\/strong><\/li>\n<li>On the sidebar, go to Files \u2192 <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:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/hsotinger-agency-editing-permissions-toggle.png\/public\" alt=\"\" width=\"701\" height=\"373\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/hsotinger-agency-editing-permissions-toggle.png\/w=848,fit=scale-down 848w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/hsotinger-agency-editing-permissions-toggle.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/hsotinger-agency-editing-permissions-toggle.png\/w=768,fit=scale-down 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>\n<h2 id=\"h-step-1-access-the-wp-config-php-file\">Step 1 \u2013 Access the wp-config.php file<\/h2>\n<ol>\n<li>Open the <a data-click-id=\"hgr-post-content-link-file-manager\" href=\"\/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.<\/li>\n<\/ol>\n<h2 id=\"h-step-2-enable-wp_debug\">Step 2 \u2013 Enable WP_DEBUG<\/h2>\n<ol>\n<li>Click the wp-config.php file to open it in the editor.<\/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<\/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>Click <strong>Deploy<\/strong> in the top-right corner to make the changes live.<\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\"alignnone wp-image-24692 size-full\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_17-14-e1793873704522.png\" alt=\"\" width=\"1562\" height=\"794\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_17-14-e1793873704522.png 1562w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_17-14-e1793873704522-300x152.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_17-14-e1793873704522-1024x521.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_17-14-e1793873704522-768x390.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_17-14-e1793873704522-1536x781.png 1536w\" sizes=\"(max-width: 1562px) 100vw, 1562px\" \/><\/p>\n<h2 id=\"h-log-website-errors-privately\">Log website errors privately<\/h2>\n<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>\n<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>\n<pre>define( 'WP_DEBUG_LOG', __DIR__ . '\/wp-content\/debug.txt' );\r\ndefine( 'WP_DEBUG_DISPLAY', false );<\/pre>\n<p>And click <strong>Deploy<\/strong> to make the changes live.<\/p>\n<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>\n<p class=\"no-margin\"><strong>Additional resources<\/strong><\/p>\n<ul>\n<li><a data-click-id=\"hgr-post-content-link-wordpress-debug-a-comprehensive-guide\" href=\"\/tutorials\/debug-wordpress\/\">WordPress debug: a comprehensive guide<\/a><\/li>\n<li><a data-click-id=\"hgr-post-content-link-how-to-fix-500-internal-server-error-at-hostinger\" href=\"\/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 data-click-id=\"hgr-post-content-link-how-to-find-the-websites-configuration-file-at-hostinger\" href=\"\/support\/3313359-how-to-find-the-website-s-configuration-file-at-hostinger\/\">How to find the website&#8217;s configuration file at Hostinger<\/a><\/li>\n<\/ul>\n<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":{"_content_updated_date":"","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-\u044f\u043a-\u0443\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438-wp_debug-\u0432-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":16,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1078\/revisions"}],"predecessor-version":[{"id":24694,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1078\/revisions\/24694"}],"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}]}}