Dprime Error Catcher v1.1.0

Catches PHP fatal errors and logs them to a viewable file. Install before testing risky plugin uploads or code changes. Remove when debugging is done.

Installation

  1. Download the plugin zip from my.dprime.au or the plugin page.
  2. In your WordPress admin go to Plugins > Add New > Upload Plugin.
  3. Choose the zip file and click Install Now.
  4. Activate the plugin.
  5. Perform the action you want to test (activate another plugin, upload code, change PHP version).
  6. Go to Dprime > Error Catcher and check the Log tab.
This plugin is a debugging tool. Activate it before a risky change, check the log, then deactivate and delete it when done.

Log viewer

The Log tab shows the most recent 200 entries from the log file. Each entry shows the error type, the full error message, the file and line number, and the timestamp.

  • Entries are shown newest first.
  • The full log file on disk is not trimmed. The viewer just limits what is displayed to keep the page responsive.
  • The Clear log button wipes the log file on disk completely after a confirmation prompt.

A red banner appears across every wp-admin screen when the log contains entries. It stays until you clear the log.

What it catches

The plugin catches these PHP error types via the shutdown function:

E_ERROR E_PARSE E_CORE_ERROR E_COMPILE_ERROR

It does not catch warnings, notices, or deprecated messages. To capture those, add these lines to your wp-config.php:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

WordPress will then write warnings and notices to wp-content/debug.log.

Log file location

Errors are written to wp-content/dprime-error.log. This path is outside the plugins directory so the file survives plugin deactivation and deletion.

  • Each entry is one line: [YYYY-MM-DD HH:MM:SS] TYPE message in /path/to/file.php on line N
  • The file is created automatically the first time a fatal is caught.
  • After deleting the plugin, remove the log file manually via your file manager or FTP if you want to clean up completely.

Frequently asked questions

Will the plugin slow down my site?

No. The shutdown function only does work when a fatal error has already occurred. On a normal request it adds no overhead.

Is the log file publicly accessible?

On most servers, no. The wp-content directory is not typically configured to serve files directly. If you have concerns, confirm your server configuration and add a deny rule in your .htaccess file if needed.

Can I keep this plugin active permanently?

The plugin works fine if left active, but it is designed as a short-term debugging tool. Remove it when your investigation is done to keep your plugin list clean.

The log file says the same error on every line. Why?

PHP fires the shutdown function once per request. If every request triggers the same fatal, you will get one entry per page load. The fix is to resolve the underlying error.

Override classes

Every element on the plugin admin page has a named CSS class for custom styling.

/* Log viewer */
.dpec-page          /* Outer page wrapper */
.dpec-log-wrap      /* Log viewer card */
.dpec-log-entry     /* Single log entry row */
.dpec-log-time      /* Timestamp column */
.dpec-log-type      /* Error type badge */
.dpec-log-msg       /* Error message text */
.dpec-log-file      /* File path text */
.dpec-log-empty     /* Empty state message */
.dpec-clear-btn     /* Clear log button */
.dpec-banner        /* Red error banner in wp-admin */

/* Help tab */
.dpec-help          /* Help tab outer wrapper */
.dpec-help-section  /* Individual help card */
.dpec-help-list     /* Bulleted list in a help section */