Turn On Debugging in WordPress

WordPress comes with a built-in debugging system that allows you to catch errors, save them in a log file, and troubleshoot issues.

To turn it on, you need to enable debug mode by editing the wp-config.php file. Just locate the following line:

define( 'WP_DEBUG', false );

Now, go ahead and replace this line with the following code:

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

If you visit your WordPress website now, it will show you debugging information and the critical error message.

Debug mode not only shows PHP errors but warnings and notices, too. This helps you find out what is causing the problem so that you can fix it.

It will also save error logs in the debug.log file and save the file in the /wp-content/ folder.

https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-critical-error-in-wordpress/

Leave a Reply

Your email address will not be published. Required fields are marked *