[wp-trac] [WordPress Trac] #51230: WP_DEBUG is flagged when using the development environment type

WordPress Trac noreply at wordpress.org
Mon Jun 2 18:05:00 UTC 2025


#51230: WP_DEBUG is flagged when using the development environment type
--------------------------------------+------------------------------
 Reporter:  desrosj                   |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Site Health               |     Version:  5.5
 Severity:  normal                    |  Resolution:
 Keywords:  good-first-bug has-patch  |     Focuses:
--------------------------------------+------------------------------

Comment (by westonruter):

 I just ran across this issue myself. Indeed it is unexpected for this test
 to fail in a `local` or `development` environment, but especially `local`.
 I've used this plugin code in the mean time to suppress:

 {{{#!php
 <?php
 add_filter(
         'site_status_tests',
         static function ( array $tests ): array {
                 if ( in_array( wp_get_environment_type(), array( 'local',
 'development' ), true ) ) {
                         // Debug mode is expected on local and development
 environments.
                         unset( $tests['direct']['debug_enabled'] );
                 }
                 return $tests;
         }
 );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51230#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list