As WordPress error logs are your website’s black box recorder, finding and accessing them is one of the most frequently discussed topics among WordPress users.
The following guide will walk you through every useful method for using cPanel, File Manager, FTP, and WP_DEBUG to check WordPress logs.
In brief, the debug.log WordPress file is located in /wp-content/debug.log, whereas the primary WordPress error log route is /public_html/error_log. These can be accessed via File Manager, FTP, cPanel WordPress logs, or by turning on WP_DEBUG for further logging options.
What Are WordPress Error Logs?
WordPress error logs are files that record problems happening on your website’s backend. They help you quickly understand what’s going wrong without guessing. These logs track various issues, like PHP errors, database connection problems, missing files, or conflicts with plugins and themes.
By checking these error logs, you can find the source of the issue, which can help troubleshoot and ensure that you resolve the issue more efficiently.
Types of Logs You’ll Commonly Use:
- Error Log – Shows PHP errors and warnings generated by your site.
- Debug Log – Created when WP_DEBUG is turned on in WordPress.
- Access Log – Track all visitors, hits, bots and requests.
- Server Log – Records Apache/NGINX server-side errors.
- Plugin Logs – Some plugins create logs inside their own folders.
Quick Lookup Table – Where Logs Are Stored
|
Log Type |
Location |
Filename |
| PHP Error Log |
/public_html/ |
error_log |
| WP Debug Log |
/wp-content/ |
debug.log |
| Raw Access Logs |
cPanel >> Raw Access |
access.log |
| Plugin Logs |
/wp-content/plugins/plugin-name/logs/ |
log.txt |
Checklist Before You Start Troubleshoot
Before accessing logs, make sure you have:
- Access to your cPanel
- FTP credentials (optional)
- Basic knowledge of navigating File Manager
- A text editor (Notepad/VS Code)
- Backup of your wp-config.php file
- Caching disabled temporarily (if logs don’t update)
How to Enable WordPress Debug Mode
To enable WordPress debug mode, edit wp–config.php and add WP_DEBUG and WP_DEBUG_LOG as true. This generates a debug.log file inside wp–content.
Steps to Enable Debug Mode
Steps:
- Log in to your cPanel.
- Select the ‘File Manager’ option.

- Go to your WordPress folder.
- Open and edit the wp-config.php file.

- Add the following lines before That’s all, stop editing!
- define(‘WP_DEBUG’, true);
- define(‘WP_DEBUG_LOG’, true);
- define(‘WP_DEBUG_DISPLAY’, false);

- Save the file.
- Visit your site again – WordPress will create /wp–content/debug.lo
How to Access WordPress Error Logs
1. View Error Logs Directly in cPanel:
Steps:
- Log in to your cPanel.

- Click ‘Errors’ under the Metrics section.

- Here you’ll see recent:
- PHP warnings
- Fatal errors
- Theme/plugin issues
- Missing file errors

2. View Log Files Using File Manager
Steps:
- Go to cPanel and open File Manager.

- Open public_html
- Look for:
- error_log
- php_errorlog
- debug.log (if WP_DEBUG is on)
- Open the file and read the latest errors.
3. Access Logs Through FTP
Steps:
- Open FileZilla or any FTP client
- Connect using your FTP credentials
- Open public_html
- Download the error_log or debug.log file
- Review the entries in your text editor
4. Access Server & Raw Access Logs via cPanel
Steps:
- Go to cPanel >> Metrics.

- Click Raw Access.

- Download the .gz log file.
- Extract and open it with a text editor.
Common WordPress Errors Found in Logs
|
Error Type |
Example Message | What It Means |
|
Fatal Error |
Call to undefined function |
Plugin or theme conflict |
|
Memory Exhausted |
Allowed memory size exhausted |
Need to increase PHP memory |
|
Deprecated Warning |
Function xyz is deprecated |
Old code used in theme/plugin |
|
Database Error |
Error establishing DB connection |
Wrong DB credentials or DB down |
Best Practices for Managing WordPress Logs
- Delete old logs regularly to keep space clean.
- Disable WP_DEBUG after troubleshooting.
- Keep WordPress updated.
- Maintain backups.
- Use a staging environment before making major changes.
Helpful Reference Links:
Conclusion
By revealing the exact fault that is causing problems on your website, WordPress error logs make troubleshooting much simpler. Regardless of whether you use cPanel, File Manager, FTP, or WP_DEBUG, these logs serve as a guide to rapidly identify and resolve technical issues.
You can preserve the features of your WordPress website and confidently diagnose issues by following the above instructions.