{"id":2025,"date":"2022-05-13T18:33:46","date_gmt":"2022-05-13T18:33:46","guid":{"rendered":"https:\/\/blog.hostinger.io\/fr\/support\/2022\/05\/13\/5157262-comment-activer-wp_debug-chez-hostinger\/"},"modified":"2025-10-30T14:18:50","modified_gmt":"2025-10-30T14:18:50","slug":"5157262-comment-activer-wp_debug-chez-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/fr\/support\/5157262-comment-activer-wp_debug-chez-hostinger\/","title":{"rendered":"Comment Activer WP_DEBUG Chez Hostinger?"},"content":{"rendered":"<p class=\"no-margin\">Si vous souhaitez avoir une meilleure compr&eacute;hension des erreurs, apparaissant sur votre site web ou ses pages, WP_DEBUG est un outil irrempla&ccedil;able pour vous aider !<\/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><p class=\"no-margin\">WP_DEBUG vous montre des informations sur toute erreur sur votre site web se produisant en ce moment. Pour l&rsquo;activer, il suffit d&rsquo;ouvrir <b><a href=\"https:\/\/hpanel.hostinger.com\/hosting\/\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">H&eacute;bergement <\/a><\/b>&rarr; G&eacute;rer &rarr; Gestionnaire de fichiers et de trouver votre fichier <code>wp-config.php<\/code>. Il sera plac&eacute; dans <b>domains\/domain.tld\/public_html<\/b> (o&ugrave; domain.tld est votre nom de domaine) :<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/fr\/support\/wp-content\/uploads\/sites\/56\/2022\/05\/4c5fcd8b-5fb7-4b35-a4e8-87ca309d55ef.jpg\"><\/div><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">\n<\/p><h1 id=\"h_0b03810eba\">WP_DEBUG<\/h1><p class=\"no-margin\">Dans wp-config.php, trouvez la ligne avec &lsquo;WP_DEBUG&rsquo; :<\/p><p class=\"no-margin\">\n<\/p><pre><code>define( 'WP_DEBUG', false );<\/code><\/pre><p class=\"no-margin\">Si oui, pour activer le d&eacute;bogage, il suffit de remplacer <code>false <\/code>par <code>true <\/code>et d&rsquo;enregistrer les modifications.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Si ce code n&rsquo;existe pas dans votre fichier wp-config.php, vous pouvez l&rsquo;ajouter au-dessus du <\/p><p class=\"no-margin\">\n<\/p><pre><code>\/*That's all, stop editing! Happy publishing.*\/<\/code><\/pre><p class=\"no-margin\">Cela ressemblera &agrave; ceci :<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/fr\/support\/wp-content\/uploads\/sites\/56\/2022\/05\/49f4b917-0a81-4224-a21e-13b2b46362f8.jpg\"><\/div><p class=\"no-margin\">\n<\/p><h1 id=\"h_e528c0400f\">WP_DEBUG_LOG<\/h1><p class=\"no-margin\">WP_DEBUG vous montre des informations sur l&rsquo;erreur, qui se produit en ce moment. Pour voir les donn&eacute;es historiques, il suffit d&rsquo;activer WP_DEBUG_LOG. Pour ce faire, il suffit d&rsquo;ajouter la ligne suivante dans <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\">En dessous de la ligne qui active WP_DEBUG. C&rsquo;est tout ! Maintenant, toutes les erreurs seront enregistr&eacute;es dans le fichier <b>debug.log<\/b>, situ&eacute; dans le dossier <b>wp-content<\/b> de votre site web.<\/p><p class=\"no-margin\">\n<\/p><h1 id=\"h_7d76e9b155\">WP_DEBUG_DISPLAY<\/h1><p class=\"no-margin\">Pendant que WP_DEBUG active le mode de d&eacute;bogage sur votre site web, pour mieux suivre toutes les erreurs possibles, vous pourriez ne pas vouloir qu&rsquo;elles soient affich&eacute;es sur le site web (et ne soient disponibles que dans le journal, par exemple). Si vous souhaitez masquer les erreurs, il suffit d&rsquo;ajouter cette ligne apr&egrave;s avoir activ&eacute; 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\"><b>REMARQUES :<\/b><\/p><ul>\n<li>\n<p class=\"no-margin\"><b><a href=\"https:\/\/www.hostinger.com\/tutorials\/debug-wordpress\" target=\"_blank\" class=\"intercom-content-link\">Qu&rsquo;est-ce que WP DEBUG : Un guide compr&eacute;hensible<\/a><\/b><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b><a href=\"https:\/\/support.hostinger.com\/en\/articles\/4548688-basic-actions-in-file-manager\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">Actions de base dans le gestionnaire de fichiers<\/a><\/b><\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Activation du d\u00e9bogage des erreurs de votre site web WordPress<\/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":[154],"tags":[],"class_list":["post-2025","post","type-post","status-publish","format-standard","hentry","category-gestion-de-wordpress"],"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\/fr\/support\/wp-json\/wp\/v2\/posts\/2025","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/comments?post=2025"}],"version-history":[{"count":2,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/posts\/2025\/revisions"}],"predecessor-version":[{"id":4999,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/posts\/2025\/revisions\/4999"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/media?parent=2025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/categories?post=2025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/tags?post=2025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}