This tool helps developers see and understand errors in WordPress.
-
Changes big error pages to show:
- The error message, list of function calls, code parts, and source with highlights
- Data from superglobals
- A “Copy for AI” button and an “Ignore error” button (this hides the page when you reload)
-
Shows errors in JSON format for JSON or CLI requests
-
Can also log HTTP requests and fake responses if
ENABLE_MOCK_HTTP_INTERCEPTORis true -
Saves logs in files inside
wp-content/logs/, and rotates them
- Put the plugin folder into
wp-content/plugins/wp-debugger/ - Turn it on in WordPress
(Use
?disable_debug=1in the URL to stop it from loading)
-
Cause an error to see the error page, or use
init_debugger() -
Use these helper functions in
functions.php:write_log( ...$messages )— saves messages towp-content/logs/0-debugger.log(auto-rotates)format_stack_trace( $trace )andlog_stack_trace( $trace )— clean up and save function call listsdump( ...$vars )— shows data in a nice way (HTML or JSON)dd( ...$vars )— dump and stop right awaydump_filter_callbacks( $filter, $dump = true )— look at hook functions (show or save them)recursively_decode_json( $data )anddebugger_format_variable( $value )— helper functions for logging
-
Skip the error page with
?skip_wp_debugger=1, or press “Ignore error” to set a cookie that hides it
- Uses
http_api_debugto save request and response logs towp-content/logs/{domain}-requests.log(errors go to{domain}-errors.log) - If
ENABLE_MOCK_HTTP_INTERCEPTORis true, some URLs return fake data from code instead of making a real request