How to enable debug mode in wordpress? [using wp-config.php]

Enabling debug mode in wordpress displays the PHP errors, notices and warnings throughout the wordpress site. Developer can easily debug the code errors on wordpress site once the errors info is displayed on error pages.

When wordpress is not in debug mode, PHP displays only fatal errors or sometimes it displays nothing (White Screen Of Death).

Below are the easy steps to enable debug mode in wordpress

Enabling debug mode using wp-config.php

    1. Access your site’s root directory via FTP
    2. Find and Open wp-config.php file
    3. Find PHP variable WP_DEBUG 
    4. If it is found, by default it will be set to false as shown below. Make it to true; replace false with true
define( 'WP_DEBUG', false );

Else, add below line BEFORE /* That's all, stop editing! Happy blogging. */

define( 'WP_DEBUG', true );

5. Save the file and upload it to the site’s root directory

Now refresh the error page where you see fatal error or white screen of death on wordpress site. The page will display the PHP errors and warnings.


  1. Do not enable debug mode on live site as the error information will be displayed to the users which increases the risk of your site’s security
  2. Set WP_DEBUG to false after debugging and fixing the wordpress errors
  3. If you don’t see any errors even after enabling debug mode, then the problem could be something else on your wordpress like settings etc.

About the Author


A passionate blogger. Love to share solutions and best practices on wordpress hosting, issues and fixes, excel VBA macros and other apps