How do I enable debug log on my WordPress site?
- 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:
- Right below that line, add the following lines to set the name and location of the debug log file:
- 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.