Debugging in WordPress? Now it’s easy.

I believe that your WordPress site is healthy and secure. You don’t see Errors or bugs when you display your website. But one day the problem may appear. It’s live and WordPress is only technology, some times something can go wrong. What to do in such a case. Don’t panic. The first thing you should have to do is find a reason for problem. And that’s the moment for the magic word – debugging. One way is to change your wp-config.php file. In the line that contains ‘define( ‘WP_DEBUG’, false )’ change ‘false’ into ‘true’ value. But honestly doing it manually isn’t comfortable. You should use ftp client or other way of changing WordPress files on server. Luckily in our WordPress Universe we have plugins, plugins for everything.

There is special plugin for debugging – WP Debugging by Andy Fragen. With this plugin you can turn on ‘WP_DEBUG’ mode from Admin Panel of your WordPress. After installation and activation in your wp-config.php file you could see:

define( 'WP_DEBUG_LOG', true );
define( 'SCRIPT_DEBUG', true );
define( 'SAVEQUERIES', true );

From this moment all errors will be written debug.log file which you can find in /wp-content/ folder. This file can be seen from the WordPress Admin Panel. At the top of you Admin site you will see Debug Quick Look after clicking the text you will see View File. And voila you have access to logs file. Now you can catch the errors to this file and use the logs to find reasons of the problems with your website. The one thing you have to remember is that after diagnostic of website you should deactivate plugin. Leaving ‘WP_DEBUH_LOG’ to ‘true’ value is not recommended practice.

Similar Posts

Leave a Reply

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