Enable debug and debug log

To enable debug and debug log to your WordPress site, please copy and paste the following two lines to your WordPress root directory under the config.php file.

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

And then save or update the config.php file, then try to regenerate errors on your site. You will see there is a file created under the following path.

wp-content/debug.log

How to find config.php file on your host, please follow the screenshot step by step

Enable debug and debug log 1
Enable debug and debug log 2
Enable debug and debug log 3

Add the code before line  /* That's all, stop editing! Happy blogging. */

Enable debug and debug log 4

Go to  /wp-content directory to see the  debug.log file

Enable debug and debug log 5