Turn error log WP

  1. Access your WordPress website's root directory using an FTP client or a file manager provided by your hosting provider.

  2. Look for the wp-config.php file in the root directory and download it to your local machine.

  3. Open the wp-config.php file using a text editor.

  4. Locate the line that says define('WP_DEBUG', false);.

  5. Change false to true so that it now reads define('WP_DEBUG', true);.

  6. 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.

  1. Save the changes to the wp-config.php file.

  2. Create a new file in the root directory of your WordPress installation and name it debug.log.

  3. Set the file permissions for debug.log to 755 or 644 to ensure that WordPress can write to it.

  4. Monitor the debug.log file for any PHP errors or warnings. You can find this file in the same directory as your wp-config.php file.

  5. When troubleshooting is complete, it's advisable to set WP_DEBUG back to false in the wp-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.