WP Debug Toolkit 1.1.0 is LIVE. Get $300 discount on the lifetime deal now
Use Discount Code WPDTLTD

The File Viewer opens the PHP source file referenced in a log entry and displays it with syntax highlighting, centered on the line where the error occurred. This lets you read the surrounding code in context without leaving the browser or connecting via SSH/FTP.

Opening the File Viewer

There are two ways to open the File Viewer from the error log table:

  1. Hover and click — hover over a log entry and click the eye icon that appears.
  2. Keyboard — hover over a log entry and press Q.

The File Viewer opens as an overlay showing the source file content.

What it shows

  • File path — the full path to the PHP file on the server
  • Line number — the specific line where the error was reported
  • Syntax-highlighted code — the PHP source with the error line highlighted and centered in the viewport, with surrounding lines visible for context

When it works

The File Viewer reads files through the viewer’s PHP API. The file must be readable by the web server’s PHP process. On most WordPress installations, plugin, theme, and core files meet this requirement by default.

When it does not work

The File Viewer cannot display a file when:

  • Permission issues — the PHP process does not have read access to the file. This can happen with restrictive server configurations or files owned by a different system user.
  • Files outside the web root — files in system directories or paths not accessible to the PHP process cannot be read.
  • Files modified since the error — the File Viewer shows the current file content. If the file has been updated, moved, or deleted since the error was logged, the code around the reported line number may no longer match the error.

Security

The viewer’s API enforces path traversal protection. Requests for sensitive files are blocked regardless of the path provided. The blocklist includes:

  • wp-config.php
  • secure-debug.php
  • .htaccess and .htpasswd
  • .env
  • config.php (viewer config)
  • auth.php (viewer authentication)
  • rate-limiter.db (blocked by specific filename)
  • Files inside .git directories
  • SQLite database files (.sqlite)

Attempting to view a blocked file returns an error. This protection cannot be bypassed through path encoding or traversal sequences.

On this page
Try WP Debug Toolkit
The best error log viewer with amazing developer tools to help you troubleshoot your WordPress site securely and efficiently. Something something more.