How to Enable WordPress Error Logs Using wp-config.php?

Do you want to set up WordPress error logs in wp-config file? The wp-config file in WordPress not only controls your WordPress site settings, it is also a very a useful debugging tool to help you find and fix errors. In this article, we will show you how to set up WordPress error logs in the wp-config file.

Step::1 First, you will need to edit your wp-config.php file. You can access it by connecting to your website using an FTP client like Filezilla or File Manager app in cPanel.

Step::2 Go to public_html and Right-click on the wp-config.php file and choose an Edit option.

A popup appears for encoding confirmation. Click on the Edit button to continue.

Step::3 A new tab opens up in the web browser, where you can see codes of the file. Look for the line that says ‘That’s all, stop editing! Happy blogging/publishing.’
Just before this line you need to add the following code:

define( 'WP_DEBUG', true ); 
define( 'WP_DEBUG_LOG', true );


Step::4 Click on the Save Changes button and close the file.

To review your WordPress Error Logs you need to go to /wp-content/ folder and inside it your will find a file called debug.log.

You can download, view, or edit this file. It will contain all WordPress errors, warnings, and notices that were logged.

Visit our Blog for more details. You can also watch the video here.

  • how to set up WordPress error logs in WP-Config file, How to Enable WordPress Error Logs Using wp-config.php
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Fix WordPress error “There has been a critical error on your website”

Step::1 First of all login to your cPanel and go to File ManagerStep::2 Go inside public_html and...

How to Stay Logged in for a longer period in your WordPress?

Step::1 First of all you must know the theme which is currently activated in your website. So...

How to bulk delete spam comments in your WordPress website?

Step::1 Login to your cPanel and click on File Manager sectionStep::2 Go to public_html and then...

How to Change WordPress logo in wp-admin page?

Step::1 Login to your cPanel and go to File Manager sectionStep::2 Now go to Public_html Step::3...

How to Change WordPress Admin Username?

Step::1 Login to your WordPress dashboardStep::2 Now at the same time login to your WordPress...