How to Deactivate WordPress Debug Mode


With debug mode activated, a WordPress powered website may experience slower response time and may reveal many previously unseen PHP notices and warnings.


WordPress allows website owners to activate debug mode via the main wp-config.php file that is located in the website’s root folder. This mode is regulated by the predefined WordPress constant WP_DEBUG. By default it is turned OFF but it can be activated by changing the false value to true.

define(‘WP_DEBUG’, false);


Before you start, please make sure that you have the ability to perform the following actions on your web server. Otherwise consider contacting your website hosting provider for assistance.

  • Recompile PHP module
  • Enough permissions to modify the wp-config.php file

Read Me First

It is a very good practice to have debug mode turned ON while your website is the development or testing stages. This allows you can capture and resolve many issues before deploying the website publicly (production). However, it is strongly recommended to turn this mode OFF in your production environment (publicly accessible) because it may slow down website response time and display unnecessary and confusing PHP errors.


Access your website filesystem via a FTP client and open for editing the wp-config.php file located in the website’s root folder. Find the WP_DEBUG constant definition and change true to false.

Please note: If the constant is not defined, copy the code below and paste it above the /* That’s all, stop editing! Happy blogging. */ line.

define(‘WP_DEBUG’, false);

For more information about debug mode check the official WordPress documentation.

Fix WordPress PHP errors instantly with CodePinch!

Get Started
Thank You! Message Submitted Successfully!