Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk9 min

How to Check Your WordPress Site’s Error Log (wp-content/debug.log)

Learn the exact wp-config.php settings, cPanel or FTP steps, log-reading method, troubleshooting checks and cleanup needed to inspect a WordPress error log safely.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To check a WordPress error log, enable logging in wp-config.php, reproduce the problem, open wp-content/debug.log, and then turn debugging off again. On a live site, keep WP_DEBUG_DISPLAY set to false so diagnostic messages are recorded without being shown to visitors.

The procedure below uses cPanel File Manager or FTP and applies to a standard WordPress installation. Managed hosts can restrict access or expose their own debug controls, so dashboard labels may differ.

As an Amazon Associate I earn from qualifying purchases.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What WordPress’s error log is for

WordPress can write PHP notices, warnings and fatal errors to a text file instead of displaying them in the browser. That file is normally wp-content/debug.log. It is useful when a page is blank, returns a 500 error, stops loading after a plugin change or behaves differently for logged-in and logged-out visitors.

A browser may show only “There has been a critical error” or a completely white page. The log can add the timestamp, error severity and the file path involved, giving you a starting point for identifying a plugin, theme, WordPress core file or server-side problem. A log does not automatically fix the issue; it records what happened while logging was enabled.

The settings are documented in the setup guides from wp-staging, WPBeginner and WPBookster. Their menu names and examples assume a conventional WordPress file layout.

Before changing the configuration

Have a way to edit the site files

You need either your hosting control panel’s File Manager or an FTP account that can reach the WordPress installation. The site root is often named public_html, but hosts may use a different directory. If WordPress is installed in a subdirectory, look for wp-admin, wp-includes and wp-content together; the wp-config.php file is normally nearby.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Protect the original file

Download a copy of wp-config.php before editing it. A misplaced character, missing semicolon or duplicate constant can prevent WordPress from loading. Use the editor’s save function only after checking the inserted lines carefully.

Use a short diagnostic window

Debugging is intended for finding a problem, not for permanent production operation. Error output can reveal server paths and other implementation details. Record only the actions needed to reproduce the fault, inspect the log, and remove or disable the diagnostic settings when finished.

Enable the WordPress debug log

1. Open wp-config.php

  1. Sign in to your hosting control panel and open File Manager, or connect with FTP.
  2. Navigate to the WordPress root, commonly public_html.
  3. Select wp-config.php and choose View, Edit or the equivalent text-editor command. With FTP, download the file, edit it locally, and upload it back to the same directory.

2. Find the stop-editing line

Scroll near the end of the file until you find the comment that says, in substance, “That’s all, stop editing! Happy publishing.” Add the debug constants immediately above that line. Keeping them together makes later cleanup easier.

3. Add the three constants

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

WP_DEBUG turns WordPress debugging on. WP_DEBUG_LOG tells WordPress to write messages to the log, normally wp-content/debug.log. WP_DEBUG_DISPLAY prevents those messages from being printed in pages sent to visitors. The combination is suitable for diagnosing a live site more safely than displaying errors on screen.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Avoid duplicate definitions

Search the file for each constant before saving. If you already see define( 'WP_DEBUG', false );, change false to true instead of adding a second definition. Do the same for an existing WP_DEBUG_LOG or WP_DEBUG_DISPLAY line. Duplicate definitions can create confusing results and make cleanup harder.

5. Save without changing the PHP syntax

Keep the semicolon at the end of every define() statement and use ordinary straight quotation marks. Do not add the lines after the stop-editing comment. If the editor offers an encoding option, retain the file’s existing encoding. Save the file, then load the site once to confirm that it still responds.

Constant Value while diagnosing Purpose
WP_DEBUG true Enables WordPress’s debugging mode.
WP_DEBUG_LOG true Writes diagnostic messages to wp-content/debug.log.
WP_DEBUG_DISPLAY false Keeps diagnostic messages out of the visitor-facing page.

The settings and placement are described by WPBookster, WPBeginner and wp-staging.

Reproduce the problem deliberately

Logging begins recording events only after the constants are active. Reproduce the exact action that fails rather than clicking randomly through the site. For example, open the URL that produced the blank page, submit the form that triggered the 500 response, or repeat the administrative action that stopped working.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open a fresh browser tab or private window so an old cached response does not mislead you.
  2. Perform the smallest repeatable action that causes the error.
  3. Note the time, URL, account state (logged in or logged out), and what you clicked. The timestamp helps you separate the relevant entry from older messages.
  4. If the failure occurs only once, repeat it once more after recording the first result. Avoid generating thousands of requests, because that makes the file harder to read and can make it grow rapidly.

If the site shows a white screen or a 500 response, do not wait for a visible PHP message. With WP_DEBUG_DISPLAY set to false, the intended result is that the details are written to the file rather than exposed in the page.

Find and open wp-content/debug.log

Using cPanel File Manager

  1. Return to the WordPress root and open the wp-content directory.
  2. Look for debug.log. It may not exist until WordPress has written at least one message.
  3. If you reproduced the error before the file appeared, reload File Manager or use its Refresh control.
  4. Choose View to read the file in the browser, or Edit to inspect it in the text editor. Downloading a copy is safer if the file is large.

Using FTP

  1. Connect to the site and open the directory containing wp-config.php.
  2. Open /wp-content/.
  3. Download debug.log and open it in a plain-text editor. Do not use a word processor that may alter line endings or insert formatting.

A cPanel-specific path is also described in the Prostack cPanel guide. If your host does not permit direct file access, consult its WordPress documentation; managed WordPress services may provide a separate debug switch or restrict the standard file location. The host-specific differences are noted in hosting.com’s debugging guide.

Read the log without losing the useful entry

Start at the newest lines

Open the end of the file first. New entries are generally appended as events occur, so the bottom of the file is the most likely place to find the failure you just reproduced. Use your recorded time to confirm that you are looking at the right request.

Separate the signal from old messages

A log can contain notices generated by earlier visits, background tasks or a different page. Copy the small group of lines surrounding the matching timestamp into a separate working note. Keep the original file unchanged until you have finished checking it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Identify severity and the file path

Pay attention to words such as Fatal error, Warning and Notice. A fatal error is the most urgent because it can stop the request; warnings and notices may point to compatibility or configuration issues without stopping every page. The path in the message often indicates whether the request reached a plugin, a theme, WordPress core or a server-level PHP file.

Look for the first relevant cause

Several lines may follow one failure. Read upward within the same timestamped group and find the first line that names the missing function, class, file or permission problem. Later lines can be consequences of that initial condition. If the path names a plugin or theme, note its directory and the exact line number before making a change.

Preserve privacy when sharing diagnostics

Log entries can contain full server paths, usernames, domain-specific directories or request data. Remove those details before posting a snippet publicly. Keep the untouched file privately in case your host needs the original context.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot when no log appears

The file is missing

First confirm that the constants are in the active wp-config.php, above the stop-editing comment, and that there is no later definition overriding them. Reload the failing page after saving, then refresh the wp-content directory. The file is created only when something is logged, so enabling the settings alone may not create it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

wp-content cannot be written

WordPress must be able to write to wp-content for the standard log file to be created. If the directory is read-only or its ownership prevents the web server from writing, the setting can be correct while the file remains absent. Ask the host to correct the directory’s write access using its normal support process; do not apply arbitrary permissions that expose the entire site.

You still see a blank page or 500 error

That visible symptom does not mean logging failed. A blank screen can hide the message that would otherwise be printed, which is why the file is important. Check the file immediately after reproducing the error. If it remains empty, verify that you edited the configuration file used by this installation and ask the host whether server-level PHP errors are stored in a separate log.

The log grows very quickly

Repeated visits, scheduled tasks or a recurring warning can add entries continuously. Stop reproducing the fault once you have the relevant block, download a copy if needed, and disable logging after analysis. Leaving an uncontrolled log in place wastes disk space and increases the chance that sensitive paths remain accessible.

The dashboard does not match these instructions

Some managed WordPress hosts hide the file system or add a dashboard switch. Follow the host’s documented route if it differs, and ask support where its WordPress debug output is stored. The standard constants remain useful concepts, but a host may override them or collect the messages elsewhere.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the message to choose the next action

When a plugin or theme path is named

Record the component name, file and line number. If the error began immediately after an update, temporarily deactivate that component using the normal WordPress administration screen if available. If the administration area is inaccessible, use the host’s file manager or FTP only to rename the specific component directory, then test the site and restore the original name after the test. Make one change at a time so you know which action affected the result.

When a core path is named

Do not edit a WordPress core file to silence the message. Check whether the entry is actually caused by a plugin or theme call shown elsewhere in the same block. If the message points to damaged or missing core files, use your host’s supported WordPress repair or replacement procedure and keep a backup before proceeding.

When the message concerns a missing file, class or function

Confirm that the named extension is installed and enabled, and that its files were uploaded completely. A mismatch between a component and the server’s PHP version can also appear as an undefined function or class. Give the exact log text and timestamp to the component developer or hosting support rather than guessing at multiple changes.

When the log shows only notices

Notices may not explain a hard failure. Match their timestamps to the user-visible symptom and continue looking for a fatal error or warning in the same request. Do not suppress every notice simply to make the file quiet; doing so can hide a compatibility issue that becomes serious after an update.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Turn debugging off after the fix

  1. Open the same wp-config.php file.
  2. Change define( 'WP_DEBUG', true ); back to false.
  3. Change define( 'WP_DEBUG_LOG', true ); back to false.
  4. Keep WP_DEBUG_DISPLAY set to false, or remove the temporary line if your site’s original configuration did not contain it.
  5. Save the file and test the previously failing URL in a fresh session.
  6. Delete wp-content/debug.log after you have retained any diagnostic copy you genuinely need.

Deleting the file prevents old paths and messages from accumulating, but it is not a substitute for disabling the constants. If logging remains enabled, WordPress can create a new file as soon as another message is generated. The cleanup guidance is covered by WPBookster.

A repeatable checklist

  • Back up wp-config.php before editing.
  • Confirm you are editing the active WordPress installation.
  • Place the constants above the stop-editing comment.
  • Use WP_DEBUG_DISPLAY set to false on a live site.
  • Reproduce one known failure and record its time.
  • Open or download wp-content/debug.log.
  • Inspect the newest relevant block and note the component path and line number.
  • Make one corrective change, then retest.
  • Set WP_DEBUG and WP_DEBUG_LOG to false.
  • Delete the log after the investigation and protect any copy that contains private paths.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.