WP Manifestindependent plugin directory
manifest / developer / better-wp-die

Better WP Die

Improves the wp_die() interface to include a back button and friendly message, pretty outputs for arrays and objects, and stack traces if WP_DEBUG is enabled

★ 8stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/tomjn/better-wp-die/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

This plugin adds a new wp_die handler which includes:

  • A permanent back button
  • A friendly message to help non-developers
  • Formatted output for arrays and objects
  • If WP_DEBUG is enabled, a stacktrace
  • A filter for adding a logo

Usage

Adding a logo is as simple as:

add_filter( 'better-wp-die-image', function () {
    return 'http://placekitten.com.s3.amazonaws.com/homepage-samples/200/286.jpg';
});

The logo will appear to the right at the top of the wp_die output.