Does wordpress have an error log?

This tutorial explains how to enable and view WordPress error logs.

In some cases, reading WordPress error logs is mandatory to identify a problem in your site. This tutorial will show you how to do it easily.

All steps described in this tutorial include screenshots to make it easy for all users to follow them.

To enable WordPress error logs, you need access to your server through FTP, SSH or your hosting provider Cpanel/Plesk. In this article I show you how to do this both through Cpanel and through FTP.

View WordPress Error Logs from Cpanel

To begin access your hosting root directory, where your site is hosted using Cpanel, FTP or Plesk, and find the file named wp-config.php which we need to edit to enable debugging.

If you are using Cpanel, once the file is identified, right click it and press the Edit option.

Does wordpress have an error log?

If an encoding warning shows up, press the Edit button again to access the file.

Does wordpress have an error log?

Find the following line almost at the end of the file.

Does wordpress have an error log?

Remove it and paste the following lines and then press the Save button to apply changes.

Does wordpress have an error log?

After pasting that code, you can find a new file named debug.log located within the wp-content subfolder in your hosting.

Does wordpress have an error log?

In some cases, users reported the debug.log file wasn’t created, but they found a file named error_log within their root directory. If you still want the debug.log file to be created instead of the error_log file, you can rename it and the debug.log file will be created.

Note: Some plugins like Wordfence will prevent the debug.log file from being created, you need to disable it until you finish the debugging process.

Does wordpress have an error log?

All error logs will be saved in your debug.log or error_log files depending on what file is created in your case.

Does wordpress have an error log?

Of course, in many cases, the user won’t understand the log information, but it is great data you can use to realise the specific cause of an error using a search engine, just copy paste last lines related to your issue.

In my case, the errors are reporting an old PHP version.

View WordPress Error Logs Using FTP

If you are using an FTP client and want to enable error logs in WordPress, connect to your hosting, as shown below.

Note: In this tutorial, I’m using the Filezilla FTP client.

Does wordpress have an error log?

If a certificate approval request shows up as shown in the following image, press the OK button.

Does wordpress have an error log?

Enter into the public_html directory, the root directory of your website.

Does wordpress have an error log?

Find the file named wp-config.php.

Does wordpress have an error log?

Right click the file wp-config.php and download it.

Does wordpress have an error log?

Once downloaded, almost at the end of the file, find the line containing the following:

Does wordpress have an error log?

Replace the line mentioned previously with the following lines as shown in the screenshot below the code.

Does wordpress have an error log?

Then, upload the modified file to your site root directory.

Does wordpress have an error log?

Overwrite the existing wp-config.php file.

Does wordpress have an error log?

Now the debugging mode is enabled, and you can check the debug.log file under the wp-content directory to read WordPress error logs.

Conclusion

As shown in this tutorial, enabling and reading WordPress error logs is easy as long as you have access to your hosting files. Knowing how to enable the debugging mode to read logs is mandatory for any WordPress administrator in order to afford possible unknown problems.

If you have access to your server, you can use the methods explained in this tutorial, or other methods like SSH as explained in the introduction of this article. I hope this work was helpful for you to solve any inconvenience with your WordPress site.

Thank you for reading this WordPress tutorial explaining how to read error logs. Keep following us for more WordPress tips.

About the author

Does wordpress have an error log?

David Adams is a System Admin and writer that is focused on open source technologies, security software, and computer systems.

How do I find the error log in WordPress?

Reviewing Your WordPress Error Logs To review your error logs, navigate to your /wp-content/ folder in your File Manager. Locate the debug. log file. This file will contain all WordPress errors, warnings, and notices that were logged.

Does WordPress have a log file?

To look at your WordPress error logs you need to navigate to your /wp-content/ folder in your File Manager. There you need to locate the debug. log file. This is the file that will contain all WordPress errors, warnings, and notices that were logged.

How do I use error reporting in WordPress?

WordPress..
To enable error reporting in WordPress, please log into your hosting panel, locate File Manager, open WordPress directory of your website:.
Locate wp-config.php file and open it:.
WP_DEBUG has to be set to true: ? define( 'WP_DEBUG' , true);.

How do I get rid of WordPress error log?

Procedure. Add these lines to the site's wp-config. php file: ini_set('display_errors', 'Off'); ini_set('error_reporting', E_ALL ); define('WP_DEBUG', false); define('WP_DEBUG_DISPLAY', false);