Skip to content
Home > Posts > WordPress Troubleshooting – Enabling Debug

WordPress Troubleshooting – Enabling Debug

August 1, 2019 | ,

Internal Only

This troubleshooting method is available to builders with internal access only.
This article covers the following topics:


Access the site’s root directory via FTP:

Get SFTP credentials to access the site by using either of the two methods explained in detail below: Get SFTP creds with Toolzilla OR Get SFTP creds using CRM


1. Getting SFTP creds with Toolzilla:

  • If you have Toolzilla access and if Filezilla is your preferred FTP client, open this link in a firefox browser https://toolzilla.int.godaddy.com/
  • Under the section that says “WordPress Database” click the linked database name
  • A dialog box will emerge asking for you to “Enter Access Reason” > Choose “Other” > Type a reason and click “OK

Click the SFTP URL that appears in the next dialog box called “View FTP Link” to copy it > Paste it into the “Host” field on Filezilla > Click “Quickconnect


2. Getting SFTP creds using CRM:

  • If you don’t have Toolzilla access, if you use a different FTP client or if you refuse to use firefox, open this link in your browser https://x.co/crm
  • Enter the site’s domain name or customer number and search
  • Click the link to view the products page in the customer’s GoDaddy account
  • Access the WordPress overview screen for the customer’s PWS site in question
  • Scroll down to the Settings section and click to “view” SFTP/SSH details
  • Copy each detail to fill the corresponding fields in your FTP client, then connect

After you’re connected to the server:

Once you’re connected, you can either simply enable Debug OR enable Debug with logging. Both options are outlined below in detail.

Success!

1. To simply enable DEBUG mode:

  • Access the site’s root directory via your preferred FTP client using one of the two methods above
  • Locate the “wp-config.php” file
  • Edit the file (using sublime text as your default editor with your FTP client of choice works the easiest)
  • Inside the wp-config file, scroll down to the section of code concerning debugging in WordPress

Change:

define( 'WP_DEBUG', false );

To:

define( 'WP_DEBUG', true );
  • Save the file
  • CLOSE the document / tab
  • Refresh your FTP Client
  • Hard refresh (Ctrl + F5) the site

In case of an error where the site isn’t loading or is showing a “white screen of death,” the debug text will now show up telling you where the problem lies.

  • Disable debug if needed, once the problem has been solved by editing the wp-config.php file again and reverting the “true” text to “false” again.
  • Remember to CLOSE the notepad window / sublime text tab when done

In case of Filezilla, when the WP config file has been saved and closed, you should get a dialog box titled “File has changed.” Tick the box that says “Finish editing and delete local file” > then click “Yes.

Important: If you don’t close out of the file when done, and end up opening another site’s wp-config.php file in the same session, saving the next file will overwrite the first – or vise versa. This can horribly corrupt both sites.


Make sublime your default editor:

If you’re using Filezilla and sublime is not your default editor, but you wish it was, follow the steps outlined below:

  • Click “Edit” > “Settings
  • Under “File editing” > change the default editor to “Use custom editor”
  • Find the path to sublime text’s .exe file in your system and paste it there – or browse to find it
  • In the section below, select “Always use default editor
  • Keep the checkbox to watch locally edited files ticked so as to reduce human error via forgetfulness
  • Click “OK” to save your preference
  • The next file you edit should now open in sublime

2. To enable DEBUG mode with logging:

  • Access the site’s root directory via your preferred FTP client using one of the two methods above
  • Locate the “wp-config.php” file
  • Edit the file (using sublime text as your default editor with your FTP client of choice works the easiest)
  • Inside the wp-config file, scroll down to the section of code concerning debugging in WordPress

Comment out:

//define( 'WP_DEBUG', false ); on the wp-config 

And add:

// Enable WP_DEBUG mode 
define('WP_DEBUG', true); 

// Enable Debug logging to the /wp-content/debug.log file 
define('WP_DEBUG_LOG', true); 

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

Sources: https://wordpress.org/support/article/debugging-in-wordpress/, https://wordpress.org/support/article/editing-wp-config-php/, https://wordpress.org/support/article/debugging-in-wordpress/#wp_debug_log

Scroll To Top