WordPress GuideErrors → Logs

How to find and access WordPress error logs

Woman Coding on Computer

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:

You’ll find these logs useful when your site is:

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

Option B: Use an FTP client like FileZilla

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:

This does three things:

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:

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

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

2. Navigate to the log file

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

To use these plugins:

How to read and understand WordPress error logs

A typical error entry looks like this:

Here’s what it means:

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.

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