WP Coder → Debug Log switches PHP error logging on for the site and shows the log in the admin — useful when a snippet misbehaves and you have no access to the server’s files.
Using it#
- Turn on Enable Debug Log and click Save.
- Reproduce the problem — open the page, submit the form, run the snippet.
- Come back to Debug Log. The entries are listed newest first: time in the site’s time zone, a coloured level (Error, Warning, Notice, Deprecated, Other), the message, and its stack trace folded underneath.
- When you’re done, turn logging off.
While logging is on and the log has entries, the admin bar shows a Debug Log link.
WP Coder (free): the page shows the whole log file as text in one box, oldest entries first, with Save and Clear Log buttons. Filters, copy, download and the list of errors caught in snippets are WP Coder Pro.
Working with the log PRO#
- Filter by level (All, Errors, Warnings, Notices, Deprecated, Other) or by text. When nothing matches, the page says so.
- Refresh — reload the entries.
- Copy shown — copy the entries currently displayed, e.g. for a support request.
- Download log — save the whole file. Long logs show the newest entries; the download has everything.
- Clear Log — empty the file so the next test starts clean (it asks first).
The Log file box shows the file’s path, its size, how long ago the last entry was written and the time zone of the entries. Each level filter button shows how many entries of that level the log has.
Errors caught in snippets PRO#
At the top, Errors caught in snippets lists snippets whose PHP failed the last time it ran — an error, an exception, or a blocked forbidden function. Each links to the snippet. A failing snippet prints an HTML comment instead of its output until it is fixed. This list works whether or not logging is on.
What the switch does#
With Enable Debug Log on, WP Coder sets PHP to report all errors and write them to the log file from the moment plugins load. It logs everything — theme, other plugins, WordPress — not only snippets. It does not change whether errors are also shown on the page; that still follows your server and WP_DEBUG_DISPLAY settings.
In WP Coder Pro PRO: if WP_DEBUG_LOG is already on in wp-config.php, WordPress writes the log itself: the page reads the file WordPress uses (the path set in WP_DEBUG_LOG or wp-content/debug.log) and says that the switch changes nothing while the constant is on.
Keep the log private#
By default the log is wp-content/debug.log — a public folder: anyone who guesses the address can read file paths, queries and sometimes personal data. WP Coder Pro warns you when the file is public and shows its address, and reads the log from wherever WP_DEBUG_LOG puts it — set a path outside the web root in wp-config.php PRO:
define( 'WP_DEBUG_LOG', '/home/account/logs/wp-debug.log' );
Notes#
- Turn logging off when you’re done — the file grows quickly on a busy site. The free WP Coder always writes
wp-content/debug.log, so don’t leave it on. - Errors that happen before plugins load (in
wp-config.php, early must-use plugins) go to the server’s own error log.