WordPress Debugging and Fixing the Way You might Like Most

Debugging is like being the detective in a crime movie where you're also the murderer.
 - Filipe Fortes
Lastday, I have an issue. EachPiece of #code was cool and incredible to run system. But something was wrong there which was being used to excute an unexpected output.



However, I just used more than 5 hours for debugging whole system's directory and files. At the end of last momment I got the issue. It was pretty clear to me what was the purpose of using that piece of code.

Here is the code snippet to define WordPress debug module and visible it to your eyes. Don't worry seeing the code, just implement them to wp-config.php before /* That's all, stop editing! Happy blogging. */. WP_CONFIG.PHP is located to root directory in your host.

/**
* wordpress debugging
* @author ash.IF
* @licenses OpenSource
*/

//* implement the codePiece to wp-config.php
define('WP_DEBUG', true); /*define wp_debug*/
define( 'WP_DEBUG_LOG', true ); /*define wp_debug_log*/
define( 'WP_DEBUG_DISPLAY', false ); /*define debugging_logs to visible*/
define( 'SCRIPT_DEBUG', true ); /*define script_debugging*/

/**
* define SAVEQUERIES to display & analyze those queries
* long that query took to execute
* and what function called it
*/
define( 'SAVEQUERIES', true );

//* disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );


Okay, You see an image below where it shows debugging logs on WordPress dashboard.


Follow the logs to action in your functions. When your action will track right path, you'll be happy. :)

Thank you for visiting us.

Millennial & an introvert. Totally dashing beyond Passion. Code is poetry that never lies. Facebook or Drop Mail

0 comments: