When a website shows a blank page or stops working unexpectedly, the cause is rarely visible to visitors. Servers are configured to suppress error output for security reasons, so the details are written to log files instead. Knowing where to find those files lets you diagnose the problem without guessing.
This article covers two types of log file available in cPanel: the web server error log and PHP error_log files. Each records a different category of error, so checking the right one saves time when troubleshooting.
error_log files at the directory level, so you may find multiple files across your account depending on how many scripts have encountered errors.Web server errors and PHP errors are recorded separately. Web server errors are generated by Apache itself, typically for issues such as missing files, permission problems or malformed requests. PHP errors are generated by your scripts and are written directly into the directory where the offending script lives.
For most WordPress issues, including broken plugins or theme conflicts, the PHP error_log files are the most useful starting point. Web server logs are better suited to diagnosing HTTP errors such as 500 responses or redirect loops.
cPanel provides a built-in viewer for recent web server errors. This shows the last few entries logged by Apache for your account and is a quick way to spot fundamental server-level problems.

The viewer shows a snapshot of recent entries rather than the full historical log. If the entries shown do not point to the cause of your problem, PHP error_log files are the next place to look.
PHP writes errors to a file named error_log in the same directory as the script that triggered the error. A busy site can accumulate several of these files across different folders. The File Manager search function lets you locate all of them at once.
error_log and click Go. Make sure the search scope is set to Web Root or Home Directory to cover all your files.
error_log file found. Right-click the file closest to the directory where your problem is occurring and select View to read its contents.
Once you have identified the error, you can search for the specific message or file path to find a fix, or pass the details to a developer.
If the search returns no results, PHP error logging may not be active for your account, or no errors have been triggered yet. You can confirm PHP error logging is enabled by checking your PHP configuration.
error_log and log_errors directives to confirm logging is active.An empty error_log file usually means the file was created by the server but no errors have been written to it since. This can happen after a manual clear or if the error occurred in a different directory.
error_log files returned by the search, particularly those in your WordPress root directory or the wp-content/plugins folder.The cPanel Errors viewer only shows recent entries and may be empty if no web server errors have occurred lately, or if the log has been rotated. PHP errors will not appear here at all as they are written to separate error_log files.
error_log files via File Manager rather than the cPanel Errors tool.You now know where to find web server errors using the cPanel Errors tool and how to locate PHP error_log files using File Manager’s search function. Reading these files gives you the information needed to identify what went wrong and where.
Once you have identified an error, the next step is usually to check the affected plugin, theme or script for updates, or to review the file path mentioned in the log entry. Our guides on removing malware from WordPress, creating a phpinfo file and using cPanel File Manager cover related tasks that may help with your investigation.
Launch your website with our reliable cPanel hosting with unlimited bandwidth and expert support.
Get cPanel Hosting