| 开发者 | riseofweb |
|---|---|
| 更新时间 | 2026年11月1日 03:13 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
WP_DEBUG, found an error in the log, and had no idea which plugin caused it or what to do about it, this plugin is for you.
Find the cause
wp-config.php first, and you can undo it with one click..htaccess. One bad rule there can take the whole site down, so you get the rule to add yourself.wp-config.php without asking. It adds the lines that are missing. It changes an existing line in only two cases, each confirmed by you: correcting a single wrong true/false value, and giving the log a private file name. If a setting is defined more than once, it explains the problem instead of guessing. A backup is taken before every change.faultline-error-log-assistant folder to /wp-content/plugins/.Activate Faultline and go to Tools > Faultline. If logging is off, Setup turns it on for you. The Log tab then shows every entry with its severity, the plugin or theme that caused it, and a link to the source code.
Each entry on the Log tab has a "Caused by" label naming the plugin or theme, with a link to that plugin's WordPress.org support forum. "Draft forum post" writes a support request with the error and your site details filled in.
Use Setup: it is one click. Three settings have to be right together (WP_DEBUG, WP_DEBUG_LOG and WP_DEBUG_DISPLAY), or either nothing is logged or errors are shown to your visitors. Faultline sets all three in wp-config.php for you, with a backup first. If your host does not allow that, it gives you the lines to paste in.
Under Settings, tick the types to suppress: notices, deprecation warnings, coding-standard suggestions and, if you choose, warnings. Suppressed messages are never written, so there is nothing to clean up.
Faultline keeps it small in four ways: suppressed messages are never written, repeated entries are trimmed to the first and newest 10 copies each day, old entries are removed after 30 days (14 for notices and deprecations), and the file is capped at 50 MB. All four can be changed under Settings.
Yes. Faultline keeps the log from ballooning: routine messages are never written, repeats are trimmed, old entries are removed and the file size is capped. Setup keeps errors hidden from your visitors, and Faultline warns you if the log can be read from the web.
It may be. debug.log usually sits in a folder your web server serves, and it contains server paths and stack traces. Faultline requests your log over the web the way a stranger would and tells you whether it could be read. Setup runs this check at the end, and you can repeat it on the Status tab. If the log can be read, a warning shows on every admin screen until it is fixed. There are two fixes: move the log to a private file name that bots cannot guess (one click, works on any server, keeps every entry), or add a blocking rule for Apache, LiteSpeed, nginx or IIS. On nginx only your host can usually add the rule, so Faultline writes the message to send them.
No. Setup looks for the PHP error logs your site was writing before, such as the error_log files hosting control panels create, and offers to copy their recent entries into the new log. The original files are only read, never edited, moved or deleted. Automatic cleanup also waits until you finish or skip Setup.
It can. Faultline shows every log entry with its severity, the plugin or theme that caused it and the source code, alerts you to fatal errors, and keeps routine notices out of debug.log.
Faultline is built for acting on errors, not only reading them. It names the plugin or theme behind each error, opens the line of code that failed, drafts a support request, and links to AI help with private details removed. It can also stop routine notices and deprecation warnings being written in the first place. All of this is free.
No. Faultline only ever keeps messages out of the log. It never changes PHP's error reporting level and never turns on WP_DEBUG_DISPLAY, the setting that prints errors on screen. Setup sets WP_DEBUG_DISPLAY to false.
Not completely, but close. Turn on the early loader under Settings and Faultline starts before all of your regular plugins. The early loader is one small file in your must-use plugins folder (wp-content/mu-plugins). It is only added when you click the button, and it does nothing unless Faultline is active. Faultline still cannot start before WordPress itself, or before a must-use plugin whose file name sorts earlier. The Status tab shows what is in effect.
If your host does not let WordPress write to that folder, Settings shows which file to copy there yourself. It also offers "Load Faultline first", which moves Faultline to the front of your plugin list instead.
When you deactivate, Faultline asks whether to undo its wp-config.php changes first, and removes its early loader file if you turned that on. If it cannot remove that file, it tells you which file to delete before you deactivate. Deleting the plugin removes its settings and stored data. It does not touch wp-config.php or your log file.
Yes, site by site. On a network, Faultline does not add the early loader file for you, because one file affects every site. Settings shows the file to copy yourself. When the plugin is network-activated, the "Load Faultline first" setting does nothing, because WordPress stores network-wide plugins differently.
It hides the types of message you choose, and nothing else. Fatal errors, parse errors and uncaught exceptions are always logged. Warnings are logged unless you turn them off. Notices, deprecation warnings and coding-standard suggestions are suppressed by default because they are rarely something you can act on in someone else's plugin.