{
    "title": "The WordPress error log can be read by anyone",
    "description": "wp-content/debug.log is open to the public, and it can show folder paths, plugin names and sometimes private data.",
    "url": "https://ursy.com/issues/wordpress-debug-log-public/",
    "canonical": "https://ursy.com/issues/wordpress-debug-log-public/",
    "markdown": "https://ursy.com/issues/wordpress-debug-log-public/index.md",
    "json": "https://ursy.com/issues/wordpress-debug-log-public/index.json",
    "published": "2026-11-29T21:57:25+00:00",
    "updated": "2026-11-30T12:53:05+00:00",
    "language": "en-GB",
    "publisher": {
        "name": "URSY.com",
        "url": "https://ursy.com/"
    },
    "cite": "Name URSY.com and link https://ursy.com/issues/wordpress-debug-log-public/",
    "start_here": {
        "page": "https://ursy.com/issues/wordpress-debug-log-public/",
        "markdown": "https://ursy.com/issues/wordpress-debug-log-public/index.md",
        "json": "https://ursy.com/issues/wordpress-debug-log-public/index.json",
        "cite": "Name URSY.com and link the page you used.",
        "doors": {
            "llms_txt": "https://ursy.com/llms.txt",
            "facts": "https://ursy.com/facts.json",
            "mcp": "https://ursy.com/mcp/",
            "openapi": "https://ursy.com/.well-known/openapi.json"
        }
    },
    "for_ai": {
        "cite": "https://ursy.com/issues/wordpress-debug-log-public/#cite-issue-wordpress-debug-log-public",
        "this_page": [
            {
                "what": "Text (.md)",
                "url": "https://ursy.com/issues/wordpress-debug-log-public/index.md"
            },
            {
                "what": "Problem as data (.json)",
                "url": "https://ursy.com/issues/wordpress-debug-log-public.json"
            },
            {
                "what": "Truth Spine record",
                "url": "https://ursy.com/truth-spine/I-0125/"
            },
            {
                "what": "Section links",
                "url": "https://ursy.com/citations/22/#p-5756"
            },
            {
                "what": "This page for machines",
                "url": "https://ursy.com/ai-entry.json?u=/issues/wordpress-debug-log-public/"
            }
        ],
        "proofs": {
            "count": 1,
            "files": [
                {
                    "what": "Proof picture",
                    "url": "https://ursy.com/wp-content/uploads/truth-spine-proof/2026/12/www-ursy-com-truth-spine-proof-wordpress-debug-log-public-i-0125.webp"
                },
                {
                    "what": "What it shows (.md)",
                    "url": "https://ursy.com/wp-content/uploads/truth-spine-proof/2026/12/www-ursy-com-truth-spine-proof-wordpress-debug-log-public-i-0125.md"
                },
                {
                    "what": "Full record (.json)",
                    "url": "https://ursy.com/wp-content/uploads/truth-spine-proof/2026/12/www-ursy-com-truth-spine-proof-wordpress-debug-log-public-i-0125.json"
                },
                {
                    "what": "Its 12 files (sitemap)",
                    "url": "https://ursy.com/wp-content/uploads/truth-spine-proof/2026/12/companions/www-ursy-com-truth-spine-proof-wordpress-debug-log-public-i-0125.xml"
                },
                {
                    "what": "Companion sitemap",
                    "url": "https://ursy.com/wp-content/uploads/truth-spine-proof/2026/12/ursy-image-companions-sitemap.xml"
                },
                {
                    "what": "Companion catalogue",
                    "url": "https://ursy.com/wp-content/uploads/truth-spine-proof/2026/12/ursy-image-companions.jsonl"
                },
                {
                    "what": "Image index",
                    "url": "https://ursy.com/wp-content/uploads/truth-spine-proof/2026/12/ursy-image-index.jsonl"
                },
                {
                    "what": "Proof catalogue",
                    "url": "https://ursy.com/wp-content/uploads/truth-spine-proof/2026/12/truth-spine-proofs.json"
                },
                {
                    "what": "Image use",
                    "url": "https://ursy.com/image-use/"
                }
            ]
        },
        "whole_site": [
            {
                "what": "llms.txt",
                "url": "https://ursy.com/llms.txt"
            },
            {
                "what": "ai-entry.json",
                "url": "https://ursy.com/ai-entry.json"
            },
            {
                "what": "agents.json",
                "url": "https://ursy.com/agents.json"
            },
            {
                "what": "/.well-known/",
                "url": "https://ursy.com/.well-known/"
            },
            {
                "what": "MCP server",
                "url": "https://ursy.com/mcp/"
            },
            {
                "what": "AI hub",
                "url": "https://ursy.com/ai/"
            },
            {
                "what": "Image use",
                "url": "https://ursy.com/image-use/"
            },
            {
                "what": "How to cite URSY.com",
                "url": "https://ursy.com/citations/"
            }
        ]
    },
    "issue": {
        "slug": "wordpress-debug-log-public",
        "problem": "The WordPress error log can be read by anyone",
        "summary": "wp-content/debug.log is open to the public, and it can show folder paths, plugin names and sometimes private data.",
        "status": "Live",
        "priority": "high",
        "category": "security",
        "category_title": "Security and HTTPS",
        "why_it_matters": [
            "With WP_DEBUG_LOG switched on, WordPress writes PHP errors to wp-content/debug.log, and anyone who opens that address can read them. The lines often show server paths, plugin names and versions, and sometimes email addresses or other data.",
            "WordPress advises against running debug tools on a live site."
        ],
        "how_to_fix": [
            "Set WP_DEBUG_LOG to false in wp-config.php on the live site, or point it to a folder outside the website. Delete the existing file, and block .log files at the server."
        ],
        "steps": [
            "Open wp-config.php and set WP_DEBUG and WP_DEBUG_LOG to false.",
            "Delete wp-content/debug.log.",
            "Block .log files in your server settings or .htaccess.",
            "Run the WordPress Security Checker again."
        ],
        "check_it_is_fixed": "Open /wp-content/debug.log in a private window: it should be gone or answer 403. Run the WordPress Security Checker again and it should no longer report the log.",
        "found_by": [
            {
                "tool": "wordpress-security-checker",
                "name": "WordPress Security Checker",
                "status": "Live",
                "page": "https://ursy.com/wordpress-security-checker/",
                "card": "https://ursy.com/wordpress-security-checker.json"
            }
        ],
        "full_record": "https://ursy.com/wp-json/ursy/v1/issues/wordpress-debug-log-public",
        "source": {
            "url": "https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/",
            "title": "WordPress.org: Debugging in WordPress"
        },
        "cite": "The WordPress error log can be read by anyone. URSY.com. https://ursy.com/issues/wordpress-debug-log-public/"
    },
    "headings": [
        {
            "level": 2,
            "text": "Why it matters",
            "id": "why-it-matters",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#why-it-matters"
        },
        {
            "level": 2,
            "text": "How to fix it",
            "id": "how-to-fix-it",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#how-to-fix-it"
        },
        {
            "level": 3,
            "text": "What the problem looks like",
            "id": "what-the-problem-looks-like",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#what-the-problem-looks-like"
        },
        {
            "level": 3,
            "text": "What it looks like fixed",
            "id": "what-it-looks-like-fixed",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#what-it-looks-like-fixed"
        },
        {
            "level": 2,
            "text": "Fix it with your AI assistant",
            "id": "fix-it-with-your-ai-assistant",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#fix-it-with-your-ai-assistant"
        },
        {
            "level": 2,
            "text": "Fix it on your platform",
            "id": "fix-it-on-your-platform",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#fix-it-on-your-platform"
        },
        {
            "level": 3,
            "text": "WordPress",
            "id": "wordpress",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#wordpress"
        },
        {
            "level": 3,
            "text": "Your server or hosting",
            "id": "your-server-or-hosting",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#your-server-or-hosting"
        },
        {
            "level": 2,
            "text": "Check it is fixed",
            "id": "check-it-is-fixed",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#check-it-is-fixed"
        },
        {
            "level": 2,
            "text": "Official source",
            "id": "official-source",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#official-source"
        },
        {
            "level": 2,
            "text": "Questions",
            "id": "questions",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#questions"
        },
        {
            "level": 3,
            "text": "Do I need the log at all?",
            "id": "do-i-need-the-log-at-all",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#do-i-need-the-log-at-all"
        },
        {
            "level": 3,
            "text": "How do I know if someone read it?",
            "id": "how-do-i-know-if-someone-read-it",
            "url": "https://ursy.com/issues/wordpress-debug-log-public/#how-do-i-know-if-someone-read-it"
        }
    ],
    "links": [
        {
            "text": "ChatGPT",
            "url": "https://ursy.com/wiki/chatgpt/",
            "internal": true
        },
        {
            "text": "WordPress.org: Debugging in WordPress",
            "url": "https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/",
            "internal": false
        }
    ],
    "words": 565,
    "text": "wp-content/debug.log is open to the public, and it can show folder paths, plugin names and sometimes private data. Why it matters With WP_DEBUG_LOG switched on, WordPress writes PHP errors to wp-content/debug.log, and anyone who opens that address can read them. The lines often show server paths, plugin names and versions, and sometimes email addresses or other data. WordPress advises against running debug tools on a live site. How to fix it Set WP_DEBUG_LOG to false in wp-config.php on the live site, or point it to a folder outside the website. Delete the existing file, and block .log files at the server. Open wp-config.php and set WP_DEBUG and WP_DEBUG_LOG to false. Delete wp-content/debug.log. Block .log files in your server settings or .htaccess. Run the WordPress Security Checker again. What the problem looks like define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); In wp-config.php on a live site: errors are written to wp-content/debug.log, which anyone can open. What it looks like fixed define( 'WP_DEBUG', false ); define( 'WP_DEBUG_LOG', false ); define( 'WP_DEBUG_DISPLAY', false ); If you need a log on the live site, give WP_DEBUG_LOG a file path outside the website folder instead of true. Fix it with your AI assistant Paste this into ChatGPT, Claude, Gemini or your coding agent, and fill in the words in square brackets: Help me close a privacy gap on [your website address], a WordPress site on [your host, e.g. Apache]. A checker says wp-content/debug.log can be read by anyone, so it may show server paths, plugin names and private data. First check: ask me to paste the WP_DEBUG lines from wp-config.php (never the database password or keys). Explain plainly what is happening. Then give me the steps: set WP_DEBUG and WP_DEBUG_LOG to false on the live site, or point WP_DEBUG_LOG to a path outside the website folder; delete the existing debug.log after I keep a private copy if I need it; and block .log files at the server. Rules: back up wp-config.php first, change only the debug lines, and never post the log anywhere public. Tell me to look in the log for passwords, keys or customer details, and to change any that appear. Give exact code and where it goes. Finally, tell me to re-check with the URSY.com WordPress Security Checker at ursy.com/wordpress-security-checker/. Fix it on your platform WordPress Edit wp-config.php with your host's file manager or SFTP, set the debug lines to false, then delete wp-content/debug.log. Your server or hosting Block .log files. On Apache: <FilesMatch \"\\.log$\"> Require all denied </FilesMatch>. On nginx: location ~* \\.log$ { deny all; }. Check it is fixed Open /wp-content/debug.log in a private window: it should be gone or answer 403. Run the WordPress Security Checker again and it should no longer report the log. Official source WordPress.org: Debugging in WordPress Questions Do I need the log at all? Only while you are fixing a fault, and ideally on a staging copy. When you need it live, write it outside the website folder and switch it off afterwards. How do I know if someone read it? Your server access logs show requests for /wp-content/debug.log. Your host can help you look.",
    "source": "https://ursy.com/issues/wordpress-debug-log-public/"
}