{"id":383851,"date":"2026-10-18T10:44:21","date_gmt":"2026-10-18T10:44:21","guid":{"rendered":"https:\/\/ru.wordpress.org\/plugins\/debug-log-router\/"},"modified":"2026-10-18T10:44:09","modified_gmt":"2026-10-18T10:44:09","slug":"debug-log-router","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/debug-log-router\/","author":23583135,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.3","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"Debug Log Router","header_author":"","header_description":"Routes WordPress debug log entries into separate files by request context. Single sites only, multisite networks are not supported.","assets_banners_color":"afd1ea","last_updated":"2026-10-18 10:44:09","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/ko-fi.com\/ember_fox","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":79,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"emberfox","date":"2026-10-18 10:44:09","revision":3752903}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3752903,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3752903,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3752903,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3752903,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3752903,"resolution":"1","location":"assets","locale":"","width":2000,"height":1160},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3752903,"resolution":"2","location":"assets","locale":"","width":2000,"height":1160},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3752903,"resolution":"3","location":"assets","locale":"","width":2000,"height":1160},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3752903,"resolution":"4","location":"assets","locale":"","width":2000,"height":1160}},"screenshots":{"1":"Logs tab: <code>front.log<\/code>, newest entries first, each entry's type as a colored label; a long stack trace scrolls inside its row. Above: the seven files by request type and the plugin's journal.","2":"The plugin's own journal: changes to <code>wp-config.php<\/code>, logging switched on, log directories created, renamed and repaired, errors, and who did it.","3":"Status tab before setup: exactly what will be added to <code>wp-config.php<\/code> and where, and which lines will be commented out. Nothing changes until you press the button.","4":"Settings tab before setup: the log directory (rename, download as an archive) and what to delete along with the plugin."}},"plugin_section":[],"plugin_tags":[94,17813,14925,159395,19330],"plugin_category":[59],"plugin_contributors":[287339],"plugin_business_model":[],"class_list":["post-383851","plugin","type-plugin","status-publish","hentry","plugin_tags-debug","plugin_tags-debug-log","plugin_tags-error-log","plugin_tags-log-viewer","plugin_tags-wp-config","plugin_category-utilities-and-tools","plugin_contributors-emberfox","plugin_committers-emberfox"],"banners":{"banner":"https:\/\/ps.w.org\/debug-log-router\/assets\/banner-772x250.png?rev=3752903","banner_2x":"https:\/\/ps.w.org\/debug-log-router\/assets\/banner-1544x500.png?rev=3752903","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/debug-log-router\/assets\/icon-128x128.png?rev=3752903","icon_2x":"https:\/\/ps.w.org\/debug-log-router\/assets\/icon-256x256.png?rev=3752903","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/debug-log-router\/assets\/screenshot-1.png?rev=3752903","caption":"Logs tab: <code>front.log<\/code>, newest entries first, each entry's type as a colored label; a long stack trace scrolls inside its row. Above: the seven files by request type and the plugin's journal."},{"src":"https:\/\/ps.w.org\/debug-log-router\/assets\/screenshot-2.png?rev=3752903","caption":"The plugin's own journal: changes to <code>wp-config.php<\/code>, logging switched on, log directories created, renamed and repaired, errors, and who did it."},{"src":"https:\/\/ps.w.org\/debug-log-router\/assets\/screenshot-3.png?rev=3752903","caption":"Status tab before setup: exactly what will be added to <code>wp-config.php<\/code> and where, and which lines will be commented out. Nothing changes until you press the button."},{"src":"https:\/\/ps.w.org\/debug-log-router\/assets\/screenshot-4.png?rev=3752903","caption":"Settings tab before setup: the log directory (rename, download as an archive) and what to delete along with the plugin."}],"raw_content":"<!--section=description-->\n<p>Most debug log tools show you the one <code>debug.log<\/code> WordPress writes. Debug Log Router splits it by the kind of request instead: an error a visitor hit on the front end, a warning from the admin, and a failure in a background cron task land in different files. You see at once what the error cost, and cron errors, which never show up on any page, stop drowning in the rest.<\/p>\n\n<h4>Seven contexts, seven files<\/h4>\n\n<ul>\n<li><code>front.log<\/code> \u2014 the public site<\/li>\n<li><code>admin.log<\/code> \u2014 the admin area<\/li>\n<li><code>ajax.log<\/code> \u2014 admin-ajax requests<\/li>\n<li><code>rest.log<\/code> \u2014 the REST API, a custom REST prefix included<\/li>\n<li><code>cron.log<\/code> \u2014 WP-Cron<\/li>\n<li><code>cli.log<\/code> \u2014 WP-CLI<\/li>\n<li><code>xmlrpc.log<\/code> \u2014 XML-RPC<\/li>\n<\/ul>\n\n<p>Files are created as they are needed: on a site without WP-CLI, <code>cli.log<\/code> never appears. Entries are written in the usual PHP log format, so the files still open in any text editor and over FTP.<\/p>\n\n<h4>Reading and downloading<\/h4>\n\n<ul>\n<li>Tools \u2192 Debug Logs, Logs tab: newest entries first, 50 at a time, up to 500 in the browser.<\/li>\n<li>The plugin's own journal is there too: what it changed in <code>wp-config.php<\/code> and in the log directory, and what it could not do.<\/li>\n<li>Any log and the journal can be downloaded as a file from the Logs tab. The whole log directory downloads as a zip archive from the Settings tab if the server has the PHP <code>zip<\/code> extension; without it, the files download one by one.<\/li>\n<li>The old <code>wp-content\/debug.log<\/code> is left alone and opens in the same viewer.<\/li>\n<li>Logging is switched on and off with a single toggle on the Settings tab.<\/li>\n<li>Errors are hidden from visitors by default. You can show them or leave it to the server.<\/li>\n<\/ul>\n\n<h4>How the plugin handles wp-config.php<\/h4>\n\n<p>WordPress reads its debug constants before any plugin loads, so there is no way around <code>wp-config.php<\/code>. The plugin changes it once:<\/p>\n\n<ul>\n<li>Activation changes nothing. The edit happens only when you press the button on the Status tab, and before you do, the tab shows exactly what will be added.<\/li>\n<li>The edited file is checked before it replaces the original: if the result does not parse, or anything else in it is not as expected, <code>wp-config.php<\/code> stays exactly as it was. Its permissions, owner and group are kept.<\/li>\n<li>A short block is added that loads the plugin's loader and names the plugin's folder in uploads. All settings live there and in the database: switching logging and changing other settings never touch <code>wp-config.php<\/code> again.<\/li>\n<li>Existing <code>define()<\/code> lines for <code>WP_DEBUG<\/code>, <code>WP_DEBUG_LOG<\/code> and <code>WP_DEBUG_DISPLAY<\/code> are not deleted but commented out, marked <code>DLOGR-DISABLED<\/code>.<\/li>\n<li>If the file cannot be written, the plugin shows the ready-made snippet, the line number where it goes and a copy button.<\/li>\n<li>The block is removed with the \"Remove the setting from wp-config.php\" button or when the plugin is deleted, and the commented-out lines are restored.<\/li>\n<li>If the plugin files are deleted over FTP, the block does nothing and the site keeps working.<\/li>\n<li>The Status tab warns you when the same constants are defined above the block, and when the block is in place but the plugin is not loaded, for example after the site has moved, and offers a button that writes the block again with the current paths.<\/li>\n<\/ul>\n\n<h4>Log directory<\/h4>\n\n<p>Logs are kept in <code>wp-content\/uploads\/debug-log-router\/dlogr-logs-xxxxxxxx<\/code> (wherever your uploads folder is), where the last eight characters are random. The name is the main protection: the directory's address cannot be guessed. The second layer is an <code>.htaccess<\/code> file that blocks direct access on Apache and LiteSpeed. If the name ever leaks, one button gives the directory a new one. No PHP files are written to the uploads folder.<\/p>\n\n<h4>Privacy<\/h4>\n\n<p>The plugin sends no data off your server and contacts no external services. Keep in mind that PHP logs themselves can contain paths on disk, pieces of SQL queries and data of your site's users. That is why only administrators can see them and why the log directory is protected as described above. The plugin's journal records which user performed each action.<\/p>\n\n<h4>Multisite<\/h4>\n\n<p>WordPress networks (multisite) are not supported: the plugin has not been tested on them and makes no claim to work there.<\/p>\n\n<h4>Languages<\/h4>\n\n<p>The plugin's texts follow the language of your WordPress profile; translations arrive as language packs from translate.wordpress.org. On the Settings tab the plugin's page can be switched to English on its own, while the rest of WordPress keeps your language: handy when you look up an error message or send a screenshot to support.<\/p>\n\n<h4>Support<\/h4>\n\n<p>The Support tab explains what the plugin does and where to report bugs, and shows the version and licenses.<\/p>\n\n<h4>Credits<\/h4>\n\n<p>Icons by Lucide (https:\/\/lucide.dev), ISC license. Some icons come from the Feather project, MIT license. The license texts are in <code>assets\/icons\/LICENSE<\/code>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate the plugin. Activation changes neither <code>wp-config.php<\/code> nor any files on disk.<\/li>\n<li>Go to Tools \u2192 Debug Logs, Status tab.<\/li>\n<li>Press \"Set up and enable logging\". The plugin adds its block to <code>wp-config.php<\/code> and creates the log directory.<\/li>\n<li>If <code>wp-config.php<\/code> is not writable, paste the snippet shown by hand, at the place indicated.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"which%20entries%20never%20reach%20the%20plugin%27s%20logs%3F\"><h3>Which entries never reach the plugin's logs?<\/h3><\/dt>\n<dd><p>Anything that happens in <code>wp-config.php<\/code> above the plugin's block: the database constants and salts, lines added by your host, and code loaded through <code>auto_prepend_file<\/code>. Nothing inside <code>wp-config.php<\/code> can catch what happened before it started running. Errors below the block, the rest of <code>wp-config.php<\/code> included, do reach the logs, while the standard <code>debug.log<\/code> never sees them at all.<\/p><\/dd>\n<dt id=\"what%20happened%20to%20the%20old%20debug.log%3F\"><h3>What happened to the old debug.log?<\/h3><\/dt>\n<dd><p>While the plugin's logging is on, that file is not used: entries go to the plugin's files instead. The old file stays where it is and opens on the Logs tab. Keep in mind that it has no protection of its own and may be readable straight from a browser.<\/p><\/dd>\n<dt id=\"i%20switched%20logging%20off.%20did%20wp-config.php%20change%3F\"><h3>I switched logging off. Did wp-config.php change?<\/h3><\/dt>\n<dd><p>No. The toggle only changes the plugin's own file.<\/p><\/dd>\n<dt id=\"what%20happens%20on%20deactivation%3F\"><h3>What happens on deactivation?<\/h3><\/dt>\n<dd><p>Logging stops. The block stays in <code>wp-config.php<\/code> but does nothing until the plugin is activated again.<\/p><\/dd>\n<dt id=\"what%20is%20deleted%20along%20with%20the%20plugin%3F\"><h3>What is deleted along with the plugin?<\/h3><\/dt>\n<dd><p>When the plugin is deleted, it removes its block from <code>wp-config.php<\/code>. Everything else goes only if you ticked it beforehand on the Settings tab. There are separate checkboxes for the current log directory, for each directory left over from earlier installs, and for the plugin's data (journal and settings). Nothing is ticked by default: you can delete the plugin and keep the logs, and the next install picks them up. Once no log directory is left, the plugin's folder in uploads goes too.<\/p>\n\n<p>If the block could not be removed \u2014 for example because <code>wp-config.php<\/code> is not writable \u2014 nothing is deleted. In that case, delete the lines from <code>BEGIN Debug Log Router<\/code> to <code>END Debug Log Router<\/code> by hand and drop the <code>DLOGR-DISABLED<\/code> prefixes. It is safer to remove the block with the button on the Status tab before deleting the plugin: there you can see whether it worked.<\/p><\/dd>\n<dt id=\"why%20do%20entries%20go%20to%20the%20server%27s%20log%20instead%20of%20the%20plugin%27s%20files%3F\"><h3>Why do entries go to the server's log instead of the plugin's files?<\/h3><\/dt>\n<dd><p>This happens when the host has fixed the PHP log path in the server configuration (for example with <code>php_admin_value[error_log]<\/code>). Neither the plugin nor WordPress itself can change it. The plugin warns about this on the Status tab and, if the server's file is readable, shows it on the Logs tab. Keep in mind that such a file may be shared by several sites on the server.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20keep%20a%20copy%20of%20wp-config.php%3F\"><h3>Does the plugin keep a copy of wp-config.php?<\/h3><\/dt>\n<dd><p>No. Every change is checked before the file is replaced, and a change that does not pass leaves <code>wp-config.php<\/code> untouched. The plugin's own changes are undone by removing its block, not by restoring an old copy, so lines that other plugins or your host added later stay in place. If you want a copy anyway, take one before you press the button.<\/p><\/dd>\n<dt id=\"my%20server%20runs%20nginx.%20are%20the%20logs%20protected%3F\"><h3>My server runs nginx. Are the logs protected?<\/h3><\/dt>\n<dd><p>nginx does not read <code>.htaccess<\/code>, so there the random directory name is the only protection. To close the directory completely, add a rule to your nginx configuration.<\/p><\/dd>\n<dt id=\"site%20health%20warns%20that%20the%20log%20may%20be%20public\"><h3>Site Health warns that the log may be public<\/h3><\/dt>\n<dd><p>WordPress shows this warning for any log inside the site's directory, judging by the path alone. The plugin adds an explanation to the text of that check: the directory was created by the plugin, its name is random, and it has an <code>.htaccess<\/code> file. The plugin does not change the status of the check.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>","raw_excerpt":"Splits the WordPress debug log into seven files by request type and shows the logs right in the admin.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/383851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=383851"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/emberfox"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=383851"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=383851"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=383851"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=383851"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=383851"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=383851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}