2013-06-26

removing unecessary underscores from link

← Older revision

Revision as of 20:59, 26 June 2013

Line 1:

Line 1:

 

WP_DEBUG is a PHP constant (a permanent global variable) that can be used to trigger the "debug" mode throughout WordPress. It is assumed to be false by default and is usually set to true in the [[Editing_wp-config.php|wp-config.php]] file on development copies of WordPress.

 

WP_DEBUG is a PHP constant (a permanent global variable) that can be used to trigger the "debug" mode throughout WordPress. It is assumed to be false by default and is usually set to true in the [[Editing_wp-config.php|wp-config.php]] file on development copies of WordPress.

 

 



For information on other debugging tools built into WordPress see [[Debugging_in_WordPress]]

+

For information on other debugging tools built into WordPress see [[Debugging in WordPress]]

 

 

 

==Usage==

 

==Usage==

 

 



define('WP_DEBUG', true);

+

define( 'WP_DEBUG', true );



define('WP_DEBUG', false);

+

define( 'WP_DEBUG', false );

 

 

 

{{Note|The <var>true</var> and <var>false</var> values in the example are not set in apostrophes (') because they are boolean values. If you set WP_DEBUG to 'false' that will be interpreted as true because it is a string rather than a boolean.}}

 

{{Note|The <var>true</var> and <var>false</var> values in the example are not set in apostrophes (') because they are boolean values. If you set WP_DEBUG to 'false' that will be interpreted as true because it is a string rather than a boolean.}}

Line 13:

Line 13:

 

The <tt>WP_DEBUG</tt> option was added in WordPress [[Version 2.3.1|Version 2.3.1]].

 

The <tt>WP_DEBUG</tt> option was added in WordPress [[Version 2.3.1|Version 2.3.1]].

 

 



[http://trac.wordpress.org/ticket/5473 Starting with WordPress version 2.3.2, database errors are printed only if WP_DEBUG is set to <var>true</var>]. In earlier versions, database errors were always printed. (Database errors are handled by the wpdb class and are not affected by [http://www.php.net/errorfunc PHP's error settings].)

+

[http://trac.wordpress.org/ticket/5473 Starting with WordPress version 2.3.2, database errors are printed only if WP_DEBUG is set to <var>true</var>]. In earlier versions, database errors were always printed. (Database errors are handled by the [[Class_Reference/wpdb|wpdb class]] and are not affected by [http://www.php.net/errorfunc PHP's error settings].)

 

 

 

Starting with WordPress version 2.5, setting WP_DEBUG to <var>true</var> also raises the [http://www.php.net/error-reporting error reporting level] to E_ALL and activates warnings when deprecated functions or files are used; otherwise, WordPress sets the error reporting level to <tt>E_ALL ^ E_NOTICE ^ E_USER_NOTICE</tt>.

 

Starting with WordPress version 2.5, setting WP_DEBUG to <var>true</var> also raises the [http://www.php.net/error-reporting error reporting level] to E_ALL and activates warnings when deprecated functions or files are used; otherwise, WordPress sets the error reporting level to <tt>E_ALL ^ E_NOTICE ^ E_USER_NOTICE</tt>.

Show more