The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →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.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
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.
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.
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
- Sign in to your hosting control panel and open File Manager, or connect with FTP.
- Navigate to the WordPress root, commonly
public_html. - Select
wp-config.phpand 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.
Rank #2
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.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute4. 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.
Rank #3
- Open a fresh browser tab or private window so an old cached response does not mislead you.
- Perform the smallest repeatable action that causes the error.
- 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.
- 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
- Return to the WordPress root and open the
wp-contentdirectory. - Look for
debug.log. It may not exist until WordPress has written at least one message. - If you reproduced the error before the file appeared, reload File Manager or use its Refresh control.
- 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
- Connect to the site and open the directory containing
wp-config.php. - Open
/wp-content/. - Download
debug.logand 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.
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.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.
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.
Best Value
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.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →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.
Turn debugging off after the fix
- Open the same
wp-config.phpfile. - Change
define( 'WP_DEBUG', true );back tofalse. - Change
define( 'WP_DEBUG_LOG', true );back tofalse. - Keep
WP_DEBUG_DISPLAYset tofalse, or remove the temporary line if your site’s original configuration did not contain it. - Save the file and test the previously failing URL in a fresh session.
- Delete
wp-content/debug.logafter 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.
Quick Recap
A repeatable checklist
- Back up
wp-config.phpbefore editing. - Confirm you are editing the active WordPress installation.
- Place the constants above the stop-editing comment.
- Use
WP_DEBUG_DISPLAYset tofalseon 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_DEBUGandWP_DEBUG_LOGtofalse. - 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.




