| 开发者 | tlloancy |
|---|---|
| 更新时间 | 2026年9月15日 18:08 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp_die failures, and exceptions that a third-party plugin caught so the site would not white-screen.
Each row stores:
$wpdb, or from a small adapter when a plugin talks to MySQL outside $wpdb)$wpdb->last_query), memory at the limit, and exceptions another plugin caught so the site would not white-screen. Typical case: an All-in-One WP Migration export that fails with “refresh and try again” while the real cause is a 128M SELECT or a full disk.
It is for the morning after: the site crashed, nobody was watching, and you want the cause.
Plugins that bypass $wpdb
Some exporters (All-in-One WP Migration among them) run SQL on $wpdb->dbh directly. $wpdb->last_query is then empty or already overwritten (cron, Action Scheduler). Stack Trace keeps SQL in memory via adapters and, on failure, can read that plugin's own error-log last_query field. It does not edit third-party files and does not hook their export pipeline as a stage.
Automatic update failure emails (WordPress 7.2+)
A failed automatic plugin update already includes the fatal message, file, and line. Stack Trace adds memory and last SQL from the same loopback check, with a link to the full log.
tlloancy-stack-trace folder to /wp-content/plugins/.On a normal request the cost is a shutdown callback that returns immediately unless PHP reports a fatal. A row is written only when something is recorded. Adapters add work only for the target plugin's AJAX (for example an All-in-One export hop): a header check on success, disk I/O only on failure.
300 by default. Older rows are pruned when you open the admin page. Override the limit with TLLST_MAX_ENTRIES in wp-config.php.
No. It does not reorder active_plugins and it does not patch files on disk.
If the crash is inside a known custom MySQL client, $wpdb->last_query is often unrelated. The adapter's in-memory SQL (or that plugin's error log) is used instead.