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
- 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.phpfile, usually found in the root directory.
- Edit wp-config.php:
- Open the
wp-config.phpfile 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.
- Open the
- Check the error log:
- The error log will be created in the
wp-contentdirectory, nameddebug.log. - You can access this file to view the logged errors and troubleshoot accordingly
- The error log will be created in the
Using a Plugin
If you prefer not to edit code, you can use a plugin like WP Debugging:- Install the plugin:
- Go to your WordPress dashboard.
- Navigate to
Plugins > Add New. - Search for “WP Debugging” and install it.
- Activate the plugin:
- Once activated, the plugin will automatically enable debug mode and start logging errors.
- View the error log:
- The error log will be available in the
wp-contentdirectory, similar to the manual method
- The error log will be available in the








