◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Errors → Logs
How to find and access WordPress error logs
When your WordPress site breaks, error logs are your secret weapon. These behind-the-scenes files record what went wrong—making it easier to diagnose issues like plugin conflicts, server errors, and broken code.
Let’s look at how to enable, find, and read WordPress error logs—no developer skills required.
What are WordPress error logs?
WordPress error logs are special files that store details about problems happening on your site. They usually include PHP errors, warnings, and notices, all of which can help you understand what went wrong and how to fix it.
Here’s what they log:
- Errors in your themes and plugins
- Conflicts between PHP functions or versions
- Server or hosting configuration issues
- Code mistakes that prevent pages from loading
You’ll find these logs useful when your site is:
- Showing a white screen of death
- Giving you a 500 internal server error
- Experiencing slowdowns or crashing after an update
- Not displaying parts of the page or throwing odd messages
How to enable WordPress error logs manually
By default, WordPress doesn’t show or save error logs unless you turn on debugging. You can do this by editing a file called wp-config.php.
1. Access your WordPress files
You’ll need to connect to your site’s files either through your hosting control panel or using an FTP client.
Option A: Use cPanel’s File Manager
- Log in to your hosting dashboard (like cPanel).
- Open the File Manager.
- Navigate to your WordPress root directory (usually called public_html or the name of your site).
Option B: Use an FTP client like FileZilla
- Download and install FileZilla.
- Connect to your website using your FTP credentials (you’ll get these from your web host).
- Navigate to the root folder where WordPress is installed.
2. Edit the wp-config.php file
Look for a file named wp-config.php. It’s located in the root of your WordPress install—right alongside folders like wp-content and files like index.php.
Right-click the file and choose Edit or View/Edit, depending on your tool.
3. Add debugging code
Before the line that says
/* That’s all, stop editing! Happy publishing. */
paste in this code:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );This does three things:
- Turns on debugging mode.
- Saves errors to a file instead of displaying them on your site.
- Hides error messages from public view, so your visitors don’t see them.
4. Save and re-upload
If you’re using FileZilla, you’ll be prompted to upload the edited file. If you’re using File Manager, just hit Save Changes.
That’s it! Now WordPress will begin logging errors to a file you can read later.
Where to find the WordPress error log file
Once enabled, WordPress writes errors to a file called debug.log located in this folder:
/wp-content/debug.log
You can view or download this file using:
- File Manager in your hosting panel
- An FTP program like FileZilla
If you don’t see anything right away, try recreating the issue. Visit the page that’s broken or try triggering the error again. The log updates in real-time whenever a new error occurs.
How to view WordPress error logs using cPanel
Many hosts provide tools in cPanel to make viewing logs easier.
1. Log in to cPanel
Go to your hosting provider’s dashboard and launch cPanel.
2. Use one of these tools
Option A: File Manager
- Go to File Manager.
- Open the /wp-content/ folder.
- Find and open the debug.log file. Right-click to view or download it.
Option B: Errors or Raw Access Logs Some cPanel dashboards include a shortcut called Errors. This shows the last 300 errors on your site.
Others offer Raw Access Logs, where you can download a full log of your site’s server activity (not just WordPress errors).
How to access error logs via FTP
If your hosting doesn’t include cPanel, or you prefer using FTP, here’s how to get to your error logs:
1. Connect to your site with FileZilla
- Open FileZilla.
- Enter your host (example: ftp.yoursite.com), username, password, and port (usually 21).
- Click Quickconnect.
2. Navigate to the log file
- Browse to the wp-content folder in the right-hand (remote site) panel.
- Right-click debug.log and choose View/Edit to open it in your text editor.
Use a plugin to view error logs from the dashboard
If you’d rather not mess with FTP or file editors, there are WordPress plugins that display logs right in your dashboard.
Recommended plugins
- Error Log Monitor
- Adds a menu in the admin bar to view errors easily.
- Notifies you when new issues are logged.
- Adds a menu in the admin bar to view errors easily.
- WP Debugging
- Turns on debugging mode with a single toggle.
- Includes helpful developer tools.
- Turns on debugging mode with a single toggle.
- Query Monitor
- Best for advanced debugging.
- Shows detailed PHP errors, database queries, and hooks.
- Best for advanced debugging.
To use these plugins:
- Go to Plugins > Add New.
- Search for the plugin name.
- Click Install Now, then Activate.
- Follow the on-screen prompts to enable error logging if needed.
How to read and understand WordPress error logs
A typical error entry looks like this:
[24-Apr-2025 10:24:17 UTC] PHP Warning: Undefined variable $title in /home/example/public_html/wp-content/themes/mytheme/header.php on line 42Here’s what it means:
- Timestamp: When the error occurred.
- Error type: “Warning,” “Notice,” or “Fatal error.”
- Error description: What went wrong.
- File path: The exact file where the issue is located.
- Line number: The line of code that caused the error.
Warnings and notices are often non-fatal. Fatal errors usually mean something stopped your site from loading completely.
How to turn off error logging
1. Open your wp-config.php file again
Use the same method as before (File Manager or FTP).
2. Change the debug settings:
define( ‘WP_DEBUG’, false );
define( ‘WP_DEBUG_LOG’, false );
define( ‘WP_DEBUG_DISPLAY’, false );
Or simply remove those lines entirely.
This helps keep your server clean and protects sensitive paths from being logged or exposed.
Tips for troubleshooting WordPress errors with logs
Because things don’t always go according to plan.
- Look for repeated errors—they’re often the source of major issues.
- Try deactivating plugins or switching themes one at a time to isolate the cause.
- Combine error logs with browser dev tools (Console and Network tabs) for a fuller picture.
- Share your debug.log with developers when asking for help.
Next steps for working with WordPress error logs
Understanding and using error logs is one of the fastest ways to solve problems on your WordPress site. With just a few tweaks to your configuration, you can spot problems early—and fix them before they become bigger headaches.
Your next step? Trigger a known error on a test site or staging environment and practice walking through the process. The more comfortable you are reading logs, the more confident you’ll be in managing your site.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance either? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.
Additional resources
Diagnosing WordPress errors on your site →
Even more common errors, how to troubleshoot them, and how to solve them
Fixed: WordPress failed to write file to disk →
Learn how to fix the “Upload: Failed to Write File to Disk” error in WordPress with easy troubleshooting steps.
What is managed WordPress hosting? →
What it means, what it includes, and how to decide if it’s right for you