How to Enable the Debug Bar
In this section of the guide to the Debug Bar plugin, we will show you how to enable the Debug Feature for this plugin.
When Debug is enabled, PHP Warnings and Notices are tracked and easier to find.
|Prior to moving forward, please ensure:
Step 1) Login to the WordPress Dashboard.
Step 2) Using FileZilla, enter the appropriate login credentials to connect to your website files on the server.
Step 3) Click the Quickconnect button.
Step 4) If successful, the root folder of your WordPress Installation will display.
Step 5) On the left-hand side, navigate to a folder on your local computer where you want to save the file(s). For this example, the directory c:/web_work/test was selected.
Step 6) On the right-hand side, locate the wp-config.php file.
Step 7) Right mouse click the wp-config.php file to display a pop-menu.
Step 8) Click the Download menu item.
Step 9) If successful, the wp-config.php file has been downloaded to the directory selected earlier.
Editing the wp-config File
Step 10) Using a text editor program, such as Notepad, locate and open the wp-config.php file saved to your local computer.
Step 11) To enable Debug Mode, locate the line define(‘WP_DEBUG’, false); and replace with define(‘WP_DEBUG’, true);.
Enabling Debug Logging will cause all errors to be saved to a debug.log log file inside the /wp-content/ directory.
Step 12) To enable this option, add the line define(‘WP_DEBUG_LOG’, true);.
This option is a companion to WP_DEBUG that controls whether debug messages are shown inside the HTML of pages or not.
Step 13) To enable this option, add the line define(‘WP_DEBUG_DISPLAY’, true);.
This option saves the database queries to an array and that array can be displayed to help analyze those queries. The constant defined as true causes each query to be saved, how long that query took to execute, and what function called it.
Step 14) To enable this option, add the line define(‘SAVEQUERIES’, true);.
Modified wp-config.php File
Below is an excerpt from the wp-config.php file with the changes outlined above:
Step 15) Save the wp-config.php file.
Step 16) Navigate back to FileZilla
Step 17) On the left-hand side, right mouse click the wp-config.php file to display a popup menu.
Step 18) Click the Upload menu item.
Step 19) If prompted to Overwrite, select Yes.
The next step of the guide will focus on How to Troubleshoot with the Debug Bar.