If your website doesn’t work properly, it can be frustrating. But WordPress error logs help you find the problem.
These logs tell you what’s wrong with your site, making it easier to spot and fix the error. This improves your website’s speed and performance.
Whether you’re new to WordPress, have some experience, or are a developer — this guide will show you:
how to find error logs,
how to turn them on (enable),
and how to check them (access).
Along with this, we will also tell you:
How to solve common problems,
And how to turn off debug mode when the work is done.
Want to stay ahead with AI-driven WordPress insights and stay updated with the latest trends? Subscribe for daily search insights at wpguidepro.com to improve your WordPress strategy!
Table of Contents
How and When Can WordPress Error Logs Help?
WordPress error logs are notes that describe problems with your website, such as PHP errors, warnings, and messages. These can be a little tricky, but they are a great help. How do these logs help you:
• Finding plugin and theme issues: If a plugin or theme is slowing down or stopping your website, error logs tell you where the problem is.
• Finding server issues: If your site is having trouble connecting to the database or accessing files, the logs give you an idea of what to fix.
• Making the website faster and better: If there is some old thing happening in the website or there is some small warning, then the logs show this so that you can fix it and make the site better.
When should you check the error logs? When the website crashes, you are testing a new plugin, or you get a problem like White Screen of Death (WSOD) or 500 error – then first of all check the error logs. This will help you to solve the problem quickly.
Enabling WordPress Debug Mode With a Plugin
No problem! With the help of WordPress plugins, even beginners can easily turn on debug mode. Follow the steps below:
- Install debugging plugin
Go to the plugin section of WordPress and search for: WordPress Error Logs Monitor or WP Debugging. These tools show logs without touching the code. - Activate the plugin
After installing the plugin to activate it. As soon as you activate it, you will see a new section of “Debug” or “Logs” in the WordPress dashboard. - Enable Debug Mode
Go to the plugin settings and find the option to turn on debug mode and enable it. Some plugins automatically turn on debug mode when you install them.
Pros Plugins:
- No need to edit the wp-config.php file.
- Easy visual interface to view logs.
- Best option for beginners or non-coders.
Cons Plugins:
- They add a little extra load to your website.
- Less customization compared to manual methods.
Enabling WordPress Debug Mode Using Code
If you want more control, you can manually turn on WordPress debug mode by editing your wp-config.php file.
Follow these steps:
- How to access WordPress files Use an FTP client (like FileZilla) or login to your hosting panel (like cPanel). From there, find the wp-config.php file located in the main WordPress folder.
- Open the wp-config.php file Download this file and open it in a text editor (like Notepad++ or Visual Studio Code).
- Add debug code Find this line at the end of the file: / That’s all, stop editing! Happy blogging. / Paste the code below before this line:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); // Errors will not be shown on the site
- Save the file and upload it Save the file and upload it again on your server. When you upload, replace the old file.
What Does This Code Do?
WP_DEBUG: Enables debugging mode in WordPress.
WP_DEBUG_LOG: Saves all errors, warnings, and notices in the debug.log file.
WP_DEBUG_DISPLAY: Prevents error messages from being visible to site visitors.
How to Find and Access WordPress Error Logs
Now that you have enabled debug logging, all the errors are saved in a file named debug.log. You can find this file like this:
Go to the wp-content folder using an FTP client or your hosting control panel.
Find the debug.log file Inside the wp-content folder there will be a file named debug.log.

Open the file Download this file and open it with a text editor (like Notepad++) so that you can view its contents.
In the debug.log file you will find the date, time, and all the errors or warnings that occurred on the site written there. These people help you in understanding the exact problem and the solution becomes easy.

How to Fix Issues Found in WordPress Error Logs
Now that you have seen the error logs, it is time to fix those problems. Below are some common errors that we see in the logs and their solutions:
Plugin or Theme Conflict
- Error: Fatal error: Call to undefined function Fix: See from the error message which plugin or theme is causing the problem.
- Deactivate that plugin or change the theme. Then update or replace the plugin or theme.
Deprecated Function Error
- Error: PHP Warning: The function xyz() is deprecated Fix: Update your WordPress, themes and plugins.
- Such errors normally occur due to old files.
Database Connection Problem
- Error: Unable to establish database connection Fix: Check in wp-config.php file that the database name, username, and password are correct.
- If everything seems correct then contact the hosting provider.
File Permission Error
- Error: Permission denied for wp-content/uploads Fix: Use FTP or hosting dashboard and set the permissions of the folder to 755 or 777.
Memory Limit Problem
- Error: PHP Fatal error: Allowed memory size exhausted Fix: by adding the below code in wp-config.php file:
define( 'WP_MEMORY_LIMIT', '256M' );
Disabling WordPress Debug Mode
When you fix all the errors, don’t forget to turn off debug mode. This will keep your website secure and the log file won’t be too big.

See here how to disable debug mode:
Turning off Debug Mode with Code Open wp-config.php file and replace this line:
define( 'WP_DEBUG', true ); with this:
define( 'WP_DEBUG', false );
Deleting debug.log File When you fix the problems, delete the debug.log file from the wp-content folder – to free up space.
Make Debugging Easier with WordPress Error Logs
By accessing and understanding WordPress error logs, you can easily identify problems with your website. Whether it’s a plugin conflict or a database error — debugging improves both your site’s performance and reliability.
If you have trouble editing code or fixing errors, ask a developer for help or contact your hosting provider.
Always be proactive so your website stays fast, secure, and working well