D30,31 Nanhey Park, Uttam Nagar, New Delhi- 110059, India

how to enable error log in WordPress?

wordpress
wordpress
Enabling error logs in WordPress is a great way to troubleshoot issues on your site. Here’s a step-by-step guide to help you:

Using Code in wp-config.php

  1. Access your site’s files:
    • Use an FTP client or the file manager in your hosting control panel to navigate to your WordPress installation directory.
    • Locate the wp-config.php file, usually found in the root directory.
  2. Edit wp-config.php:
    • Open the wp-config.php file in a text editor.
    • Add the following lines of code just before the line that says /* That's all, stop editing! Happy blogging. */:
     define( 'WP_DEBUG', true );
     define( 'WP_DEBUG_LOG', true );
     define( 'WP_DEBUG_DISPLAY', false );
    
    • Save the changes.
  3. Check the error log:
    • The error log will be created in the wp-content directory, named debug.log.
    • You can access this file to view the logged errors and troubleshoot accordingly

Using a Plugin

If you prefer not to edit code, you can use a plugin like WP Debugging:
  1. Install the plugin:
    • Go to your WordPress dashboard.
    • Navigate to Plugins > Add New.
    • Search for “WP Debugging” and install it.
  2. Activate the plugin:
    • Once activated, the plugin will automatically enable debug mode and start logging errors.
  3. View the error log:
    • The error log will be available in the wp-content directory, similar to the manual method
Would you like more detailed instructions on either method?

Leave A Comment

Your email address will not be published. Required fields are marked *

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

Start chat
1