Cette extension n’a pas été testée avec plus de trois mises à jour majeures de WordPress. Elle peut ne plus être maintenue ou supportée et peut avoir des problèmes de compatibilité lorsqu’elle est utilisée avec des versions de WordPress plus récentes.

Debug

Description

Debug is a development/production tool for WordPress. It helps you find bugs in your site by letting you toggle WordPress’s built-in debug flags and by emailing you when a runtime error occurs.

Features

  • Toggle WP_DEBUG, WP_DEBUG_LOG, WP_DEBUG_DISPLAY, SCRIPT_DEBUG and SAVEQUERIES from the admin settings page.
  • View, clear and download your wp-content/debug.log tail (last 1 MB).
  • Real-time error email notification with a throttled, level-filtered error handler.
  • Automatic timestamped backup of wp-config.php before every save, plus one-click restore.

How it works

The Debug plugin modifies your wp-config.php file to enable or disable WordPress debug constants, and it reads the tail of your debug.log. A backup of wp-config.php is created automatically before each change so you can always roll back.

Note on file permissions

To edit wp-config.php, your server must allow the plugin to write that file. If it cannot, the plugin shows you the code to paste manually instead.

Security & email notifications

Notifications only fire for meaningful error levels (errors and warnings), never for deprecation notices or suppressed (@) code, and emails are queued and throttled so a busy site won’t flood your inbox or SMTP queue.

Captures d’écrans

Installation

  1. Unzip and upload debug.zip to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to the Debug settings page and configure your preferences.
  4. Hit Save Changes.

FAQ

Is my wp-config.php safe?

Yes. The plugin creates a timestamped backup of wp-config.php before every change, and the settings page lets you restore any backup with one click. wp-config.php is never downloadable from the browser.

Why am I not getting email notifications?

Make sure email notifications are enabled and a valid address is set, and that wp_mail() works on your host. Only errors and warnings trigger emails.

The plugin cannot write wp-config.php

Check your file permissions. If the file is not writable the plugin shows the exact code to paste into wp-config.php manually.

Avis

25 mars 2022
It helps get access to a site’s error log, even for lay users without contacting web hosts or filesystem access. Really useful in debugging in support. Also useful as a teaching/learning tool for basic technical debugging too.
27 novembre 2021
Thank you for this great plugin which saves time on backing up wp-config.php and turning on debug mode. Eliminates mistakes which might otherwise be introduced when manually changing wp-config.php and allows faster debugging.
11 octobre 2020
Even though updates have been a while (at least at the time of writing this), the plugin still works well and serves its purpose.
27 février 2020 1 réponse
С активацией плагина перекосило весь сайт окончательно. Не помогло даже его удаление с сайта. Все записи в админке стали из иероглифов. Хорошо, что получилось из резервной копии на хостинге сайт восстановить, а то слало как то очень хреново от увиденного.
1 décembre 2019 1 réponse
This plugin has helped me rescue many client sites when they can’t figure out how to enable WP_DEBUGon their own. I know it hasn’t been updated in forever, but it is still working for me as of WordPress 5.3.
Lire les 11 avis

Contributeurs/contributrices & développeurs/développeuses

« Debug » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.

Contributeurs

Traduisez « Debug » dans votre langue.

Le développement vous intéresse ?

Parcourir le code, consulter le SVN dépôt, ou s’inscrire au journal de développement par RSS.

Journal des modifications

1.13

  • Security: removed the ability to download wp-config.php (full credential leak). Debug log download now only serves the log via a clean admin-post.php endpoint.
  • Security: added strict path allowlisting + traversal guards to all file reads/writes.
  • Security: automatic timestamped wp-config.php backup before every save + one-click restore UI.
  • Security: error handler now only registers when email notifications are on, filters out deprecation/notice noise, respects error_reporting(), throttles and queues emails, and chains the previous handler.
  • Fix: broken Settings link href (missing closing quote) on the plugin list page.
  • Fix: esc_html_e() misuse replaced with correct escaping (esc_html, esc_attr, esc_url, wp_json_encode-style safe output).
  • Fix: tolerant, case/format-insensitive regex in debug_add_option — no more duplicate define() creation.
  • Fix: nonce action strings standardized + consistent failure notices (no silent no-op, no die()).
  • Fix: read tail capped to 1 MB (was only capping the start offset).
  • Improvements: enqueued CSS instead of inline <style> (CSP-friendly), modernized baseline (PHP 7.4+, WP 5.0+), uninstall.php cleanup.

1.12: Apr 1, 2024

  • BugFix: Fix all bug reporting in plugin https://wordpress.org/plugins/plugin-check/.
  • BugFix: Fix duplicate define variable creation error.

1.11: Mar 25, 2024

  • BugFix: Cross Site Request Forgery (CSRF) issue.

1.10: Jun 29, 2022

  • Increase security for direct access of files.

1.9: Dec 15, 2019

  • Compatible with new version.

1.7: Mar 2, 2016

  • BugFix: Display error not required for email notification enable.

1.6: Jan 24, 2016

  • Add: Email Notification Settings on plugin setting page.
  • BugFix: Resolved any user to download debug.log and wp-config.php file. now only super admin can download files.
  • BugFix: resolved error when large debug.log file load on plugin section. now only load 1.4 MB file only from end of file.

1.5: Sept 30, 2015

  • Add: Email Notification Page to Enter Notification email address and email subject.
  • Add: Handle any error and send it to your email address on real time system. (no-email delay).
  • BugFix: Resolved undefined « scrollHeight » in console log in jQuery. incase of admin debug.log file not exist.

1.4: June 2, 2015

  • BugFix: download wp-config.php file for back-up /Downloads/wp-config.php.exe to /Downloads/wp-config.php.
  • BugFix: download wp-config.php file for back-up /Downloads/debug.log.exe to /Downloads/debug.log.
  • Remove: console.log function from js.
  • Add: Add Setting page link on plugin page.

1.3: March 29, 2015

  • Add: option for download wp-config.php file for back-up.
  • Add: option for download debug.log file.
  • Add: Auto scroll down in debug.log file view in admin panel to see latest error log.

1.2: March 4, 2015

  • Add: script debug option
  • Add: save query debug option
  • Add: debug.log file view and clear option from admin panel

1.1: December 30, 2014

  • Add: Banner at wordpress Community
  • Add: Add change Log Session

1.0

  • Rewrite wp-config.php file with Debug variables.
  • Add: WP_DEBUG, WP_DEBUG_LOG, WP_DEBUG_DISPLAY Functionality.