How Enable/Disable Debug Mode In WordPress

If you work in WordPress and need a way to enable debug more on it with a certain page to can get information about something wrong easily, all you need to add a PHP constant to the wp-config.php file.

WP_DEBUG is a PHP constant add to WordPress since Version 2.3.1 and has the boolean value true or false.

This code snippet will let you enable or disable debug mode with simple steps

Steps to enable/disable:

  1. Open your host root public_html folder
  2. Open the wp-config.php file with an integrated editor, if you work localhost opens the same file using any code editor IDE.
  3. Search about WP_DEBUG constant.
  4. Simply add the following code
  5. Save the changes and check your pages as the custom text will show in the single product page or archive pages.
  6. once do this step, open any page and get parameter to the URL like
if ( isset($_GET['debug']) && $_GET['debug'] == 'debug')
  define('WP_DEBUG', true);

Get Parameter to URL like:

Newsletter Updates

Enter your email address below to subscribe to our newsletter

Leave a Reply

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