WordPress WordPress Theme Development Finishing Your WordPress Theme Testing Your WordPress Theme

Mohsen Qaddoura
Mohsen Qaddoura
22,237 Points

WP_DEBUG is set to false Errors are still shown on front end pages

WP_DEBUG is set to false Errors are still shown on front end pages on localhost.

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 */
define('WP_DEBUG', false);

/* That's all, stop editing! Happy blogging. */

2 Answers

Sue Dough
Sue Dough
35,794 Points

An error can still show even with the Boolean value false. What is the error message?

Paulius Vitkus
Paulius Vitkus
24,230 Points

It's not about specific error message this time, it's about fact, that error are still shown. But that's not very important thing, just interesting why erros are still shown, even with WP_DEBUG false.

Sue Dough
Sue Dough
35,794 Points

Of course they can still be shown. WP_DEBUG doesn't stop all errors from showing. You would need to adjust your error reporting in your php.ini that is completely seperate from wp_debug to stop all errors from showing. :)

Yudi Haryasa
Yudi Haryasa
1,612 Points

Just look at your php.ini file in your web server. You must be set the error_reporting configuration to always display error message.