Linux 软件免费装
Banner图

ErrorLight

开发者 e3pr0m
更新时间 2026年11月30日 19:55
PHP版本: 7.4 及以上
WordPress版本: 7.2
版权: GPLv2 or later
版权网址: 版权信息

标签

debug error log troubleshooting php errors debug.log

下载

1.0.0

详情介绍:

ErrorLight is made for people who have never opened a log file. It shows the end of your WordPress debug.log and your PHP error log, sorts the messages by how serious they are, explains each one in a plain sentence and says whether it comes from a plugin, a theme or WordPress itself. It also lets an administrator turn debug logging on and off from a panel, without editing any file by hand. You find it in Tools → ErrorLight. Only administrators can use it. On a multisite network only the super administrator can, and the button that edits wp-config.php is not offered there: the file is shared by every site, so the panel shows the lines to set by hand. Logs are private data, so the button is careful. ErrorLight turns logging on from the panel only after a test has confirmed that the log folder cannot be opened from a web address, whatever your server. If it cannot confirm it, wp-config.php is not changed: the panel hides the button, explains why, gives you a message for your hosting provider and shows the lines you can add by hand. See the FAQ. What you can do What this plugin does not do Privacy ErrorLight does not collect data and does not contact any external service. The only requests it makes go to your own site (loopback requests), to check that the logs cannot be downloaded from the web. A log can contain file paths, user names, e-mail addresses and other personal data, and the panel says so wherever you can download, copy or send one. The e-mails ErrorLight sends are only its own, sent with wp_mail(): It does not hook into other e-mails of your site. What ErrorLight writes Everything ErrorLight creates, including the errorlight folder in uploads and the logs in it, is removed when you delete the plugin. The lines it added to wp-config.php stay, so download your logs and turn logging off first: if logging is still on, WordPress keeps debugging without a log file until you set WP_DEBUG and WP_DEBUG_LOG to false there.

安装:

  1. Upload the errorlight folder to wp-content/plugins/, or install it from the Plugins screen.
  2. Activate the plugin.
  3. Open Tools → ErrorLight.

常见问题:

Why can't I turn logging on with the button?

There are three possible reasons, and the panel tells you which one applies:

  1. The debug lines in wp-config.php are not written in the standard way (for example, they are inside an if) or the file cannot be written. ErrorLight changes nothing and shows how the lines should be written, so you can add them by hand.
  2. You are on a multisite network, where wp-config.php belongs to every site.
  3. ErrorLight cannot confirm that the log folder is private (see the next question).

Why does the button refuse to turn logging on?

Logs can contain sensitive data, so ErrorLight turns logging on only after it has confirmed that the log folder cannot be opened from a web address, on any server. Before changing anything, ErrorLight requests a test file from that folder:

  • if the server refuses the file, logging is turned on;
  • if the server hands the file out, wp-config.php is not changed and the panel warns you;
  • if the test cannot be completed (for example the site cannot send requests to itself, or a password or firewall blocks them), wp-config.php is not changed and the panel says what it saw.
In the last two cases the button is replaced by an explanation. To solve it, ask your hosting provider to allow requests from your site to its own address and to block web access to the uploads/errorlight folder (on Nginx, a location rule that denies it). The panel has a message you can copy for them. Then press "Check again": if the check succeeds, the button comes back. You can also add the debug lines to wp-config.php by hand: the panel shows them. In that case WordPress saves the log in wp-content/debug.log, which may be downloadable, so turn logging off as soon as you are done.

Does it change my wp-config.php safely?

It checks that the new version is valid PHP before writing it, writes it directly into wp-config.php (no temporary or backup copy is created anywhere), then reads the file back and restores the original automatically if anything is wrong, and checks that the restore worked. Two requests at the same time cannot overwrite each other. Only the three debug constants are touched, and every line ErrorLight changes or adds is marked with an ErrorLight comment.

Does it work on a multisite network?

Yes, in a limited and safe way. On a network only the super administrator can open ErrorLight (from any site of the network), and reading, downloading and e-mailing the log work as usual. The button that turns logging on and off is not offered: wp-config.php is shared by every site in the network, so a change made from one site would affect all of them. The panel shows the lines to set by hand instead, and the automatic turn-off is not available. ErrorLight has no network admin screen.

What happens when I turn logging off?

WP_DEBUG and WP_DEBUG_LOG are set to false and the lines ErrorLight added are removed. ErrorLight does not restore the value they had before. If debug logging was already on before you used ErrorLight, the panel tells you.

Why does the automatic turn-off not run at the exact time?

It uses WP-Cron, which runs when someone visits the site. ErrorLight also checks every time someone opens an admin screen. If the turn-off fails, logging stays on, the panel says so and the administrator receives one e-mail.

Is my log really protected?

The log folder is inside your uploads folder, with a secret name and rules for Apache and IIS that block access from the web. Some servers (Nginx, for example) ignore those rules, which is why the button relies on the test described above and not on the rules alone. You can run the same test at any time with the check button. The old wp-content/debug.log is checked too: if it can be downloaded, the panel says so and explains how to remove it.

Why does it show only part of a large log?

A very large log would make the page slow or run out of memory, so ErrorLight reads the end of the file, up to 2 MB at a time (less when PHP has little free memory). Pick a period to look at older days. To get the whole file, download it (up to 50 MB; for larger logs you get the latest part).

Why are some times in UTC?

ErrorLight shows the dates written in the log, which PHP usually writes in UTC. It converts to your site time only where the log says it uses UTC.

更新日志:

1.0.0