View Debug Log
A lightweight developer tool for real-time WordPress debug monitoring
Plugin URL: GitHub Repository
Key Features
- Real-Time Debug Log Viewer
- Displays
WP_DEBUG_LOG
output directly in WordPress admin - No need to manually access
wp-content/debug.log
via FTP/SFTP
- Displays
- Privacy & Security
- Access restricted to users with
manage_options
capability (Admins only) - No database writes – reads log file directly
- Access restricted to users with
- Troubleshooting Tools
- File size monitoring
- Quick log clearing functionality
- Line number reference for errors
- Lightweight Implementation
- Single admin page (~50KB memory usage)
- No external dependencies
Technical Implementation
✅ Admin Interface:
- Adds “Debug Log” submenu under Tools/Dashboard
- Uses WordPress core filesystem API for secure file access
✅ Compatibility:
- Works with default
WP_DEBUG_LOG
configuration - Tested with PHP 7.4+ and WordPress 5.6+
Ideal Use Cases
- Development Environments
- Rapid debugging during plugin/theme development
- Staging Sites
- Monitor errors before pushing to production
- Troubleshooting
- Diagnose white screens or unexpected behavior
- Maintenance
- Regular error log reviews
Limitations
⚠️ Not for Production:
- Debug logs should never be publicly accessible on live sites
⚠️ Large Files:
- May struggle with log files >10MB (no pagination)
⚠️ No Filtering:
- Basic view-only interface without search/filter capabilities
Installation
- Download ZIP from GitHub
- Upload to
/wp-content/plugins/
- Activate in WordPress admin
Configuration:
Requires WP_DEBUG_LOG
enabled in wp-config.php
:
define( 'WP_DEBUG', true );
if (WP_DEBUG) {
define( 'WP_DEBUG_LOG', false );
define( 'WP_DEBUG_DISPLAY', false );
# One level up from WordPress installtion
$path = realpath($_SERVER["DOCUMENT_ROOT"] . '/..') . '/debug.log';
@ini_set('log_errors', 'On');
error_reporting(0);
@ini_set('display_errors', 0);
}