{"id":634,"date":"2026-07-01T03:48:46","date_gmt":"2026-07-01T03:48:46","guid":{"rendered":"https:\/\/brutefort.com\/blog\/wordpress-error-log-location\/"},"modified":"2026-07-15T13:43:23","modified_gmt":"2026-07-15T13:43:23","slug":"wordpress-error-log-location","status":"publish","type":"post","link":"https:\/\/brutefort.com\/blog\/wordpress-error-log-location\/","title":{"rendered":"WordPress Error Log Location: Where to Find It on Any Host"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1127\" height=\"750\" src=\"https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/back-to-school-paper-colored-paper-stationery-159519.jpeg\" alt=\"File folder structure on a server showing WordPress error log location path\" class=\"wp-image-632\" srcset=\"https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/back-to-school-paper-colored-paper-stationery-159519.jpeg 1127w, https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/back-to-school-paper-colored-paper-stationery-159519-300x200.jpeg 300w, https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/back-to-school-paper-colored-paper-stationery-159519-1024x681.jpeg 1024w, https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/back-to-school-paper-colored-paper-stationery-159519-768x511.jpeg 768w\" sizes=\"auto, (max-width: 1127px) 100vw, 1127px\" \/><figcaption>Photo by Pixabay from Pexels<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Something on your WordPress site just broke, and you need to check the error log \u2014 but you don&#8217;t actually know where it lives. That&#8217;s a common problem. The default location is simple, but hosting setups, custom configs, and security plugins can move it without any obvious sign of where it ended up.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It happens on nearly every host, from cheap shared plans to managed WordPress platforms, each with its own quirks. This guide covers every place the WordPress error log can live, how to find it on any hosting environment, and how to stop hunting for it altogether.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Quick Answer:<\/strong> By default, WordPress writes errors to <code>\/wp-content\/debug.log<\/code> once <code>WP_DEBUG<\/code> and <code>WP_DEBUG_LOG<\/code> are both enabled. Hosts and plugins can move this to a custom path, so if the file isn&#8217;t there, check your <code>wp-config.php<\/code> for a custom <code>WP_DEBUG_LOG<\/code> path or use LogMate&#8217;s System Info screen, which shows the exact file path in use on your specific site.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Default WordPress Error Log Location<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When <code>WP_DEBUG<\/code> and <code>WP_DEBUG_LOG<\/code> are both set to true in <code>wp-config.php<\/code>, WordPress writes errors to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/wp-content\/debug.log<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This path is relative to your WordPress installation root. On most shared hosting setups, the full server path looks something like <code>\/home\/username\/public_html\/wp-content\/debug.log<\/code>. The exact structure depends on your host&#8217;s directory layout.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The file is plain text and opens in any text editor. <strong>Note:<\/strong> it doesn&#8217;t exist until the first error is logged after enabling WP_DEBUG \u2014 WordPress creates it on demand, not in advance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Custom WordPress Error Log Locations<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The default path can be changed. When <code>WP_DEBUG_LOG<\/code> is set to a file path string instead of <code>true<\/code>, WordPress writes the log to that custom location:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define( 'WP_DEBUG_LOG', '\/custom\/path\/to\/my-debug.log' );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Some plugins and hosting environments do this automatically. It keeps the log outside the web root, making it inaccessible via a public URL, or stores it alongside other server logs in a standardized location. So if you&#8217;ve enabled WP_DEBUG but can&#8217;t find the log at <code>\/wp-content\/debug.log<\/code>, a custom path is likely the reason.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1124\" height=\"750\" src=\"https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/pexels-photo-1181675.jpeg\" alt=\"Server hosting directory structure showing where WordPress stores its debug log file\" class=\"wp-image-633\" srcset=\"https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/pexels-photo-1181675.jpeg 1124w, https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/pexels-photo-1181675-300x200.jpeg 300w, https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/pexels-photo-1181675-1024x683.jpeg 1024w, https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/pexels-photo-1181675-768x512.jpeg 768w\" sizes=\"auto, (max-width: 1124px) 100vw, 1124px\" \/><figcaption>Photo by Christina Morillo from Pexels<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">WordPress Error Log Locations by Hosting Environment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Different hosting types handle WordPress debug logging differently:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Shared hosting (cPanel)<\/strong> \u2014 Default path applies unless you&#8217;ve configured a custom one. cPanel&#8217;s file manager lets you navigate to <code>\/public_html\/wp-content\/<\/code> and open the file directly. Some cPanel setups also have a separate server-level error log under Metrics \u2192 Error Log, which is separate from the WordPress debug log.<\/li><li><strong>Managed WordPress hosting (Kinsta, WP Engine, Flywheel)<\/strong> \u2014 These platforms often manage debugging through their own dashboards rather than <code>wp-config.php<\/code>. Kinsta, for example, provides a WordPress error log viewer in MyKinsta. Check your host&#8217;s documentation rather than assuming the default path.<\/li><li><strong>VPS or dedicated server<\/strong> \u2014 Default path applies. You can also configure PHP&#8217;s own error_log directive in <code>php.ini<\/code> to write server-level PHP errors to a separate file, distinct from the WordPress debug log.<\/li><li><strong>Local development (Local by Flywheel, MAMP, Laragon)<\/strong> \u2014 These environments typically configure their own log paths. Local by Flywheel, for instance, stores logs in the site&#8217;s <code>logs\/<\/code> directory rather than inside WordPress itself.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Finding Your Exact Log Path Without Guessing<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Rather than navigating every possible location, LogMate&#8217;s System Info screen shows the exact file paths for both your PHP debug log and JavaScript log on your specific installation. Go to <strong>LogMate \u2192 System Info<\/strong>. The Debug Logs section lists the PHP log path and JS log path your site actually uses, plus the current file size of each. That eliminates the guesswork regardless of your hosting environment or configuration.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"913\" height=\"366\" src=\"https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/logmate-system-info-2.webp\" alt=\"LogMate System Info screen showing PHP configuration, WordPress, theme, and debug log paths and sizes\" class=\"wp-image-676\" srcset=\"https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/logmate-system-info-2.webp 913w, https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/logmate-system-info-2-300x120.webp 300w, https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/logmate-system-info-2-768x308.webp 768w\" sizes=\"auto, (max-width: 913px) 100vw, 913px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">LogMate also makes reading the log unnecessary from the server \u2014 once it knows the log path, it reads and displays the contents inside the WordPress admin. Errors are organized in a searchable table, with PHP and JavaScript errors separated, sortable by occurrence count, and exportable when you need to share with a developer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"355\" src=\"https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/logmate-website-error-logs.webp\" alt=\"LogMate main logs table showing log type, error type, message, source, occurrences, and last occurrence with filter and export options\" class=\"wp-image-682\" srcset=\"https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/logmate-website-error-logs.webp 1024w, https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/logmate-website-error-logs-300x104.webp 300w, https:\/\/brutefort.com\/blog\/wp-content\/uploads\/2026\/07\/logmate-website-error-logs-768x266.webp 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-stackable-button-group stk-block-button-group stk-block stk-a4c7f02\" data-block-id=\"a4c7f02\"><div class=\"stk-row stk-inner-blocks stk-block-content stk-button-group\">\n<div class=\"wp-block-stackable-button stk-block-button stk-block stk-1e6d9b3\" data-block-id=\"1e6d9b3\"><style>.stk-1e6d9b3 .stk-button{background:#f13434 !important;border-top-left-radius:var(--stk--preset--border-radius--small, 4px) !important;border-top-right-radius:var(--stk--preset--border-radius--small, 4px) !important;border-bottom-right-radius:var(--stk--preset--border-radius--small, 4px) !important;border-bottom-left-radius:var(--stk--preset--border-radius--small, 4px) !important;}.stk-1e6d9b3 .stk-button:before{border-color:#0f0e17 !important;}<\/style><a class=\"stk-link stk-button stk--hover-effect-darken\" href=\"https:\/\/brutefort.com\/blog\/best-security-plugins-wordpress\/\"><span class=\"stk-button__inner-text\">Get LogMate Now!<\/span><\/a><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Securing the WordPress Error Log File<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The default location at <code>\/wp-content\/debug.log<\/code> is within the web root. That means it could potentially be accessed at <code>yourdomain.com\/wp-content\/debug.log<\/code> if not protected. Most WordPress configurations block direct file access to this path via <code>.htaccess<\/code>, but it&#8217;s worth verifying that the URL returns a 403 or 404 rather than the file contents.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> To secure it explicitly, add this to your <code>.htaccess<\/code> file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Files debug.log&gt;\n    Order allow,deny\n    Deny from all\n&lt;\/Files&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, use a custom log path outside the web root by setting <code>WP_DEBUG_LOG<\/code> to an absolute path above your <code>public_html<\/code> directory. LogMate stores its own log files at randomized, non-guessable paths within the uploads directory for exactly this reason.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions About WordPress Error Log Location<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">My debug.log file doesn&#8217;t exist. Why?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress only creates the debug log file when the first error is written to it after enabling WP_DEBUG and WP_DEBUG_LOG. If both constants are active and no log file exists, either no errors have occurred since enabling debug mode, or the file is being written to a different path than you&#8217;re checking. Trigger a known error (loading a page with a broken plugin) to force the file to be created, then look for it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is there a server-level error log separate from the WordPress debug log?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Most hosting environments maintain their own PHP and server error logs separately from the WordPress debug log. These capture errors that occur before WordPress fully loads \u2014 useful for diagnosing white screens that happen at the server level. Check your hosting control panel for an &#8220;Error Log&#8221; viewer, or ask your host where their server logs are kept.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I change the WordPress error log location without editing wp-config.php?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The WP_DEBUG_LOG constant in <code>wp-config.php<\/code> is the standard way to set a custom path. Some managed hosts offer this as a dashboard setting. LogMate abstracts the log location by finding and reading the file wherever it is, so even if the path changes, LogMate&#8217;s Logs screen continues to show the correct file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does moving the error log location affect site performance?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. The write location doesn&#8217;t change how much data gets logged or how often. Performance concerns come from log volume, not file location \u2014 a debug log with thousands of repeated entries per hour is the thing to watch, regardless of where the file sits on disk.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">The WordPress error log location varies more than most documentation suggests. The fastest way to find it on any site is LogMate&#8217;s System Info screen, which shows the exact path currently in use. From there, <a href=\"https:\/\/wordpress.org\/plugins\/logmate\/\" target=\"_blank\" rel=\"noopener\">LogMate<\/a> reads the file and presents it in the dashboard, so the location becomes irrelevant for day-to-day error monitoring.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You might also like:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/brutefort.com\/blog\/wordpress-debug-log\/\">WordPress Debug Log: What It Is and How to Use It<\/a><\/li><li><a href=\"https:\/\/brutefort.com\/blog\/how-to-view-wordpress-error-logs\/\">How to View WordPress Error Logs (Every Method Explained)<\/a><\/li><li><a href=\"https:\/\/brutefort.com\/blog\/how-to-enable-wordpress-debugging\/\">How to Enable WordPress Debugging (The Safe Way for Live Sites)<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The WordPress error log location isn&#8217;t always where you expect it. Here&#8217;s where to find it across different hosting environments, and how to stop hunting for it entirely.<\/p>\n","protected":false},"author":1,"featured_media":632,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"class_list":["post-634","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debugging"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/brutefort.com\/blog\/wp-json\/wp\/v2\/posts\/634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brutefort.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brutefort.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brutefort.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/brutefort.com\/blog\/wp-json\/wp\/v2\/comments?post=634"}],"version-history":[{"count":1,"href":"https:\/\/brutefort.com\/blog\/wp-json\/wp\/v2\/posts\/634\/revisions"}],"predecessor-version":[{"id":697,"href":"https:\/\/brutefort.com\/blog\/wp-json\/wp\/v2\/posts\/634\/revisions\/697"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/brutefort.com\/blog\/wp-json\/wp\/v2\/media\/632"}],"wp:attachment":[{"href":"https:\/\/brutefort.com\/blog\/wp-json\/wp\/v2\/media?parent=634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brutefort.com\/blog\/wp-json\/wp\/v2\/categories?post=634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brutefort.com\/blog\/wp-json\/wp\/v2\/tags?post=634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}