How to Set Up WordPress Error Logs in WP-Config?

How to Set Up WordPress Error Logs in WP-Config?

Are you finding out how to set up the WordPress error logs in wp-config file? The wp-config file is an essential file that not only handles the settings of your WordPress but also useful in debugging and fixing the errors.

In this article, I’ll explain how to set up error logs in the wp-config file.

What is a wp-config file?

The WordPress wp-config.php file is a configuration file that includes essential settings of your database etc. WordPress salt keys also included in the wp-config file which helps to protect your passwords from the attackers.

Wordpress Salts

It also allows debugging mode and saves error logs of WordPress.

Setup WordPress Error Logs in WP-Config File

The wp-config file locates in the WordPress root directory. You can connect your site using FTP.
Open the wp-config file in any text editor like Notepad and add the following code just below these lines – That’s all, stop editing! Happy blogging.”

define( 'WP_DEBUG', true );

If this code already is in your wp-config file and it is set to false attribute then, you just need to set this true. This single line will will enable your WordPress debug mode.

After adding the line, save the file and upload your wp-config file back to the server.

Reviewing Your WordPress Error Logs

Connect to your WordPress site using FTP or file manager app. Then, visit those pages of WordPress which had errors or warnings.

Once you are connected, go to /wp-content/ folder, there is a file inside the folder called debug.log. This file includes WordPress errors, notices and warnings. You can view and download the debug log file even you can edit it.

Download Debug File

I hope this article helps you to learn how to set up error logs in the wp-config file.

Scroll to Top