Flow diagram showing cPanel Errors, error_log and debug.log leading to the plugin file that caused the error

How to Find and Read WordPress Error Logs (cPanel + WP_DEBUG)

When WordPress breaks, the browser rarely tells you why. You get a blank page, a “critical error” message or a 500 page. The real answer is written in a log file. Knowing how to check WordPress error logs turns guessing into a five-minute fix, because the log names the exact plugin, file and line that failed.

This guide shows you the three places to find WordPress errors on cPanel hosting, how to switch on WP_DEBUG safely on a live site, how to read a PHP error line, what to do when error_log stays empty, and how to clean up afterwards so your logs do not leak information.

Use this guide if you look after WordPress sites on cPanel, your own or a client’s. It won’t walk you through repairing one specific error. Once the log points you at the problem, use the matching fix guide, such as 500 Internal Server Error or “There has been a critical error”.

Where is the WordPress error log? Three places to check

LocationWhat it recordsBest for
cPanel > Metrics > ErrorsThe latest web server errors for your accountA quick look without opening files
error_log files in public_html (and subfolders)PHP errors from scripts in that folderPHP fatal errors and warnings
wp-content/debug.logEverything WordPress catches when WP_DEBUG_LOG is onPlugin and theme errors, notices, deprecated calls

Before you start (prerequisites)

  • cPanel login (File Manager, Metrics and MultiPHP INI Editor).
  • Optional: SSH or cPanel > Advanced > Terminal for Method 3, or FileZilla for Method 2.
  • A backup of wp-config.php. Download it before editing; one typo can stop the site.
  • The time the problem happened, so you can match it to log timestamps (logs usually use UTC, which is 5 hours 30 minutes behind IST).

Time and difficulty

TimeDifficultyRiskDowntime
10–15 minBeginnerLowNone

The quick version

Open cPanel > Metrics > Errors for a quick view, then File Manager > public_html > error_log for PHP errors. If you need more detail, add WP_DEBUG, WP_DEBUG_LOG and WP_DEBUG_DISPLAY (false) to wp-config.php, reproduce the problem and read wp-content/debug.log. Delete the log and turn debugging off when you finish.

Method 1: Check WordPress error logs in cPanel (recommended)

Step 1: Open cPanel Metrics > Errors

In cPanel > Metrics > Errors, read the list. The newest entries are at the top. This page shows the last few hundred server errors for your account, including PHP errors and blocked requests.

cPanel Errors page with an arrow to the newest entry under Latest web server error log messages
cPanel > Metrics > Errors gives a quick view of the latest errors.

You should see timestamped lines. If the page is empty, the error may be logged only in error_log or debug.log; continue to Step 2.

Step 2: Show hidden files in File Manager

In cPanel > Files > File Manager, click Settings at the top right, tick Show Hidden Files (dotfiles) and click Save. This also reveals .htaccess and .user.ini, which you may need later.

cPanel File Manager open at public_html with hidden dot folders such as .cache and .cpanel visible in the folder tree
With hidden files shown, dotfiles like .htaccess and .user.ini appear in the list.

Step 3: Open the error_log file

Open public_html. Find error_log, right-click it and choose View (or Edit for long files). Also check public_html/wp-admin/error_log, because errors in the dashboard are logged there.

cPanel File Manager file list with the error_log file highlighted and an arrow pointing to it
Each folder that runs PHP can have its own error_log file.

The last lines of the file show your most recent errors, for example:

[14-Oct-2026 05:41:09 UTC] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/USERNAME/public_html/wp-content/plugins/big-gallery/gallery.php on line 88

Step 4: Enable WP_DEBUG safely in wp-config.php

Warning: never leave WP_DEBUG_DISPLAY set to true on a live site. It prints file paths and errors to every visitor.

In File Manager, right-click public_html/wp-config.php and choose Edit. Above the line /* That's all, stop editing! Happy publishing. */, remove any existing WP_DEBUG line and paste these lines. Click Save Changes.

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
wp-config.php in a code editor with define lines for WP_DEBUG, WP_DEBUG_LOG and WP_DEBUG_DISPLAY plus @ini_set display_errors 0 on lines 88 to 91
Three debug constants and the display_errors line, above “That’s all, stop editing!”.

Optional: to write the log outside the public folder, give WP_DEBUG_LOG a path instead of true:

define( 'WP_DEBUG_LOG', '/home/USERNAME/logs/wp-debug.log' );

Step 5: Reproduce the problem and read debug.log

Visit the broken page once. Then open public_html/wp-content/debug.log in File Manager and scroll to the end.

debug.log open in a code editor with a PHP Fatal error line, its stack trace and the plugin file path boxed
debug.log collects every error WordPress catches while debugging is on.

At this point debug.log exists and has new lines with the current UTC time.

How to read a PHP error line

Every line has the same four parts. Take this example:

[14-Oct-2026 05:41:09 UTC] PHP Warning:  Undefined array key "title" in /home/USERNAME/public_html/wp-content/themes/shop-theme/header.php on line 42
PartExampleMeaning
Time14-Oct-2026 05:41:09 UTCWhen it happened (add 5:30 for IST)
TypePHP WarningHow serious it is
File.../themes/shop-theme/header.phpWhich plugin or theme the code belongs to
Lineline 42Where in that file

The type tells you what to worry about:

  • Fatal error / Parse error: stops the page. Fix these first.
  • Warning: something went wrong but the page continued. Worth fixing.
  • Notice / Deprecated: code style or future-version warnings. Usually safe to ignore on a live site; report them to the plugin author.

The folder right after wp-content/plugins/ or wp-content/themes/ is the plugin or theme to update, disable or replace.

error_log not working? Turn on log_errors in MultiPHP INI Editor

If no error_log appears even when the site errors, PHP logging may be off.

Step 6: Check log_errors in MultiPHP INI Editor

In cPanel > Software > MultiPHP INI Editor, choose Basic Mode, select your domain’s home directory, and make sure log_errors is Enabled. Click Apply.

cPanel MultiPHP INI Editor Basic Mode with the log_errors setting boxed and switched to Enabled
log_errors must be enabled for PHP to write error_log files.

You should now see a green success message. Reload the broken page and check for a new error_log.

Still nothing? Check that wp-content is writable (folder permission 755) so WordPress can create debug.log, and that no plugin calls error_reporting(0).

Method 2: Download WordPress error logs with FTP/SFTP

Use this when File Manager is slow or the log is too large to view in the browser.

  1. Connect with FileZilla using your FTP or SFTP details.
  2. In the remote pane, open public_html/wp-content. Turn on Server > Force showing hidden files if you cannot see dotfiles.
  3. Right-click debug.log and choose Download. FileZilla saves it to the folder open in the local pane.
  4. Open it in a text editor and search for Fatal.
FileZilla with the remote wp-content folder open and the right-click menu on debug.log showing Download
Right-click debug.log and choose Download to read it on your computer.

Note: the PHP error_log file sits in public_html. Download it the same way (right-click > Download) if you need it too.

The file opens locally; the newest lines are at the bottom.

Method 3: Read WordPress error logs over SSH or Terminal

Use this when you have SSH or cPanel > Advanced > Terminal. Run these commands; every command is typed out below.

cd ~/public_html
tail -n 50 error_log
tail -n 50 wp-content/debug.log
grep -i "fatal" wp-content/debug.log | tail -n 10
find ~/public_html -name error_log -size +0 -exec ls -lh {} \;
Terminal showing tail -n 50 of error_log and wp-content/debug.log, then grep -i fatal listing PHP Fatal error lines for demo_broken_plugin_get_settings()
tail shows the newest lines; grep -i fatal keeps only the crash lines.

To watch errors appear live while you reload the page, run:

tail -f wp-content/debug.log

You should find that new lines print as you load pages. Press Ctrl+C to stop.

Clean up after debugging

Warning: debug.log in wp-content can be opened by anyone who knows the URL. Delete it when you finish.

  1. Set WP_DEBUG back to false in wp-config.php.
  2. Delete wp-content/debug.log and large old error_log files (they count towards your disk space).
  3. If you must keep logging on, block access to the log with this .htaccess rule in wp-content:
<Files "debug.log">
  Require all denied
</Files>

Verify your logs are working (and private)

curl -sI https://example.com/wp-content/debug.log | head -n 1

After cleanup, the file is gone or blocked:

HTTP/2 404

A 403 also means it is blocked. A 200 means the log is public; repeat the cleanup steps.

Troubleshooting WordPress error logs

SymptomLikely causeFix
No error_log file anywherelog_errors off or hidden files not shownStep 2 and Step 6
debug.log not createdConstants placed below “stop editing”, or wp-content not writableMove the lines up; set wp-content to 755
Site shows errors to visitorsWP_DEBUG_DISPLAY true or missingSet it to false (Step 4)
Log is huge and File Manager freezesMonths of repeated noticesDownload it (Method 2) or use tail (Method 3), then delete
Only Deprecated noticesOld code, not the causeLook for Fatal or Warning lines near the time of the problem
Still stuck?—WhatsApp support on +91 94880 91432. Paste the last 20 lines of the log.

WordPress hosting where logs are easy to reach

ShoHost WordPress hosting gives you cPanel with Metrics, File Manager, MultiPHP INI Editor and Terminal, so every log in this guide is a few clicks away. If you get stuck, our team can read the log with you: WhatsApp support on +91 94880 91432. Plans come with 98.5% uptime and a 7-day refund. Unlimited free website migration, within your plan’s limits.

WordPress error logs FAQ

How do I show WordPress errors?

Set WP_DEBUG and WP_DEBUG_LOG to true and read wp-content/debug.log. On a live site, keep WP_DEBUG_DISPLAY false so visitors never see errors.

Is debug.log public?

It can be, because it sits inside wp-content. Delete it after debugging, move it outside public_html, or block it with .htaccess.

Why is my error_log empty?

PHP logging may be off (log_errors), errors may be going to debug.log instead, or the error happens in another folder such as wp-admin.

What time zone are the log entries in?

Usually UTC. Add 5 hours 30 minutes to get IST.

Can ShoHost support read my logs for me?

Yes. Send the error lines to %s and we will tell you which plugin or setting is causing it.

Related guides

Similar Posts

Leave a Reply

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