Enable debug errors in WordPress: Turning WordPress Debug to true mode will enable debug mode throughout WordPress. It may cause PHP errors, warnings, and other notifications on your screen.
Please, always turn on the WP_DEBUG and WP_DEBUG_LOG at the time of development to catch errors with ease. It is mostly useful for the development of layout will get refreshed by default:
- Edit the wp-config.php for your website. (cPanel / Plesk / Web & Classic / Managed WordPress / VPS)
- Change
- Define (‘WP_DEBUG’, false);
- to
- define (‘WP_DEBUG’, true);
- On the following line, type
- Define (‘WP_DEBUG_LOG’, true);
- Save your changes.
- Using an Internet browser, visit your site to trigger the debugging log.
- Using your hosting account’s editor, open /WP-Content/debug.log.
- Review the contents of the debug log to identify the problem to a specific plugin, theme, or configuration option that might be causing a problem.
Note: For Managed WordPress Pro plans, setting WP_DEBUG to true will completely disable the CDN (content delivery network) to help with troubleshooting the website. You can re-enable the CDN by setting WP_DEBUG to false.
Once you are done with development or troubleshooting you should set WP_DEBUG and WP_DEBUG_LOG to false, then remove the debug.log file.