Title: enable_wp_debug_mode_checks
Published: August 16, 2016
Last modified: February 24, 2026

---

# apply_filters( ‘enable_wp_debug_mode_checks’, bool $enable_debug_mode )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks/?output_format=md#wp--skip-link--target)

Filters whether to allow the debug mode check to occur.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks/?output_format=md#description)󠁿

This filter runs before it can be used by plugins. It is designed for non-web runtimes.
Returning false causes the `WP_DEBUG` and related constants to not be checked and
the default PHP values for errors will be used unless you take care to update them
yourself.

To use this filter you must define a `$wp_filter` global before WordPress loads,
usually in `wp-config.php`.

Example:

    ```php
    $GLOBALS['wp_filter'] = array(
        'enable_wp_debug_mode_checks' => array(
            10 => array(
                array(
                    'accepted_args' => 0,
                    'function'      => function() {
                        return false;
                    },
                ),
            ),
        ),
    );
    ```

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks/?output_format=md#parameters)󠁿

 `$enable_debug_mode`bool

Whether to enable debug mode checks to occur. Default true.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks/?output_format=md#source)󠁿

    ```php
    if ( ! apply_filters( 'enable_wp_debug_mode_checks', true ) ) {
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/load.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/load.php#L609)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/load.php#L609-L609)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_debug_mode()](https://developer.wordpress.org/reference/functions/wp_debug_mode/)`wp-includes/load.php` |

Sets PHP error reporting based on WordPress debug settings.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/enable_wp_debug_mode_checks/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.6.0](https://developer.wordpress.org/reference/since/4.6.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fenable_wp_debug_mode_checks%2F)
before being able to contribute a note or feedback.