Turn error log WP
Access your WordPress website's root directory using an FTP client or a file manager provided by your hosting provider.
Look for the
wp-config.php
file in the root directory and download it to your local machine.Open the
wp-config.php
file using a text editor.Locate the line that says
define('WP_DEBUG', false);
.Change
false
totrue
so that it now readsdefine('WP_DEBUG', true);
.Below the
WP_DEBUG
line, add the following lines:
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
These lines enable error logging to a file while preventing errors from being displayed on the website.
Save the changes to the
wp-config.php
file.Create a new file in the root directory of your WordPress installation and name it
debug.log
.Set the file permissions for
debug.log
to 755 or 644 to ensure that WordPress can write to it.Monitor the
debug.log
file for any PHP errors or warnings. You can find this file in the same directory as yourwp-config.php
file.When troubleshooting is complete, it's advisable to set
WP_DEBUG
back tofalse
in thewp-config.php
file to prevent displaying errors on the live site.
Remember to exercise caution while making changes to configuration files and always have a backup of your website before making any modifications.