[wp-trac] [WordPress Trac] #64155: Add stack trace to failed plugin update error notifications

WordPress Trac noreply at wordpress.org
Mon Oct 27 15:53:34 UTC 2025


#64155: Add stack trace to failed plugin update error notifications
-------------------------------------+-------------------------------------
 Reporter:  tlloancy                 |      Owner:  (none)
     Type:  enhancement              |     Status:  new
 Priority:  normal                   |  Milestone:  Awaiting Review
Component:  Upgrade/Install          |    Version:  6.8.3
 Severity:  normal                   |   Keywords:  needs-testing needs-
  Focuses:  administration, php-     |  patch
  compatibility                      |
-------------------------------------+-------------------------------------
 == Problem ==
 When a plugin update fails, WordPress sends an email notification (example
 below) indicating the failure, but no detailed error information is
 provided. Additionally, the debug log (`wp-content/debug.log`) remains
 empty, making it difficult to diagnose the cause of the failure.

 **Example Email Notification**:
 > Bonjour ! Certaines mises à jour d’extensions ont échoué sur votre site
 situé à l’adresse https://yspania.com. [...] Les extensions suivantes
 n’ont pas pu être mises à jour. [...] - WooPayments (de la version 10.1.0
 vers 10.1.1) : [https://wordpress.org/plugins/woocommerce-payments/]

 == Proposed Enhancement ==
 Add a stack trace or detailed error information (e.g., PHP error type,
 file, and line number) to the email notifications and debug log for failed
 plugin updates. This would help site administrators identify and
 troubleshoot issues more effectively.

 == Impact ==
 Without detailed error information, diagnosing plugin update failures is
 challenging, especially for non-technical users. This can lead to
 prolonged downtime, security risks, or reliance on external support.

 == Suggested Implementation ==
 Modify the plugin update process (likely in `wp-admin/includes/update.php`
 or related files) to capture and include PHP error details and a stack
 trace in:
 - The email notification sent to the site administrator.
 - The WordPress debug log when `WP_DEBUG_LOG` is enabled.
 Consider using PHP's `debug_backtrace()` or similar functions to generate
 the stack trace and include it only when debugging is enabled to avoid
 exposing sensitive information in production environments.

 == Steps to Reproduce ==
 1. Enable `WP_DEBUG` and `WP_DEBUG_LOG` in `wp-config.php`.
 2. Trigger a plugin update that fails (e.g., due to a timeout, permissions
 issue, or fatal error).
 3. Check the email notification and `wp-content/debug.log` for error
 details.
 4. Observe that no stack trace or detailed error information is provided.

 == Additional Notes ==
 This enhancement would align with WordPress's goal of improving developer
 and administrator experience by providing better tools for debugging. It
 could also reduce the number of support requests on forums like
 [https://wpfr.net/support].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64155>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list