{"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-03-16T12:12:11","modified_gmt":"2026-03-16T12:12:11","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 class=\"no-margin\">If you would like to have a better understanding of errors appearing on your website or its pages, the debugging mode of WordPress will help you out! <\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-h2b-video\">\n<iframe loading=\"lazy\" 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>\n<\/div><hr><p class=\"no-margin\">WP_DEBUG shows you information about any error on your website happening at this moment. To enable it, open  <b><a href=\"https:\/\/hpanel.hostinger.com\/hosting\/\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">Hosting<\/a><\/b> &rarr; Manage &rarr; <b>File Manager<\/b> and find your <code>wp-config.php<\/code> file. It will be located in <b>domains\/domain.tld\/public_html<\/b>, where domain.tld is your domain name: <\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2021\/04\/a5637994-d790-4df8-a871-6e8028c3cad9.jpg\"><\/div><h2 id=\"h_5517a2795a\">WP_DEBUG<\/h2><p class=\"no-margin\">Open the file and search for the line with &lsquo;WP_DEBUG&rsquo;: <\/p><p class=\"no-margin\">\n<\/p><pre><code>define( 'WP_DEBUG', false );<\/code><\/pre><p class=\"no-margin\">If you find it, just change <code>false<\/code> to <code>true<\/code>, and save changes to enable it.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">If there is no such line of code in your wp-config.php file, add it before this line:<\/p><pre><code>\/*That's all, stop editing! Happy publishing.*\/<\/code><\/pre><p class=\"no-margin\">It will look like this:<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2021\/04\/40e4f792-90ea-463a-b9a7-48462e8dab5b.jpg\"><\/div><h2 id=\"h_0e1859711d\">WP_DEBUG_LOG<\/h2><p class=\"no-margin\">To store historical data of possible errors on your website, all you need to do is enable WP_DEBUG_LOG. To do so, add the following line on <b>wp-config.php<\/b>:<\/p><p class=\"no-margin\">\n<\/p><pre><code>define('WP_DEBUG_LOG', true);<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Below the line that enables WP_DEBUG. That&rsquo;s it! Now all the errors will be logged in the <b>debug.log<\/b> file, located in your website&rsquo;s <b>wp-content<\/b> folder.<\/p><p class=\"no-margin\">\n<\/p><h2 id=\"h_96b23acb46\">WP_DEBUG_DISPLAY<\/h2><p class=\"no-margin\">While WP_DEBUG enables debugging mode on your website to better track all possible errors, you might not want them to be displayed on the website. If you wish to hide the errors and be available only from the log, simply add this line below enabling WP_DEBUG:<\/p><p class=\"no-margin\">\n<\/p><pre><code>define('WP_DEBUG_DISPLAY', false);<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">That&rsquo;s it! Now you know how to enable and disable the debugging mode for WordPress &#128522; <\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\"><b>NOTES<\/b>: <\/p><ul>\n<li>\n<p class=\"no-margin\"><b><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-debug\" target=\"_blank\" class=\"intercom-content-link\">What is WP DEBUG: A Comprehensive Guide<\/a><\/b><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b><a href=\"\/support\/4548688-basic-actions-in-file-manager\" target=\"_blank\" class=\"intercom-content-link\">Basic actions in File Manager<\/a><\/b><\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Enabling error debugging of your WordPress website<\/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-PT","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":2,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1078\/revisions"}],"predecessor-version":[{"id":6300,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1078\/revisions\/6300"}],"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}]}}