It is beneficial if you temporarily enable debugging on your WordPress site to run down any issues happening with the site from active themes, WordPress core version, or active plugins.
The default location to store the debug.log file is /wp-content/debug.log, but if you want to change the path where the debug.log file should be stored, add the following snippet into the wp-config.php file replacing the /tmp/ with your folder preference.
define( 'WP_DEBUG_LOG', '/tmp/wp-errors.log' );
If you are uncomfortable editing the wp-config file, you can use the plugin “Change Debug Log Location”
If you are using the Really Simple SSL plugin on your site, it comes with a hardening feature covering changing the debug.log storage location.
It is not recommended to keep debugging enabled long-term on a site; think of debugging as a valuable tool in WordPress. Also, if you can not resolve the errors logged into the site debug.log file, that file can easily keep writing to the log file and become large.
Since, by default, the debug.log file will not be truncated if it goes over a set size, such as 256 MB. So it’s suggested to remove the file when work has been done.