Support
Web Development
Web Development
How do I enable debug log on my WordPress site?
To enable debug logging in the wp-config.php file of your WordPress site, follow these steps:
- Log into your cPanel account.
- From the File Manager in the Files section, go to the folder where your WordPress site is installed and open the wp-config.php file by right-clicking on it and select Edit.
- Look for the line that mentions WP_DEBUG. If it doesn’t exist, you can add it after the lines with the MySQL settings.
- Change the value of WP_DEBUG from false to true. The line should look like this:
define('WP_DEBUG', true);
- Right below that line, add the following lines to set the name and location of the debug log file:
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
- Save and close the wp-config.php file.
From this point, WordPress will log error messages to the debug.log file, which will be created in the wp-content folder.
This is a basic step to enable debug logging in WordPress through the wp-config.php file. With the above method, you will be able to identify and address any potential errors or issues that you may experience with your WordPress site.