USES : WP_DEBUG is very helpful to identify unknown issues on your WordPress websites.
Step 1: Login to your cPanel account.
Step 2: Select the File Manager option under FILES.
Step 3: Click the wp-config.php under your Document Root directory and select the Edit option.
Step 4: To turn on or enable the WP_DEBUG, you have to add the single line of code in wp-config.php file, which as follows:
+++
define(‘WP_DEBUG’, True );
+++
Step 5: Once enabled the WP_DEBUG, wordpress will start generating errors & logs and they will be stored in debug.log file.
The location of debug.log file is “wp-content” folder.
Step 6: Also necessary to turn on the WP_DEBUG_LOG & turn off ‘WP_DEBUG_DISPLAY’ feature which will start saving all errors to a debug.log file.
+++
define ( ‘WP_DEBUG_LOG’, true);
define ( ‘WP_DEBUG_DISPLAY’, false);
+++
Step 7: Disabling of WP_DEBUG_DISPLAY will start saving all these logs to your log file.
[Note: If this is not done, all the errors and notices will start appearing on the front-end and visible to your site visitors.]
Step 8: Finally click Save changes option.