Articles of wp debug

Suppress deprecated notices

When I use: define(‘WP_DEBUG’, 1); In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices. My understanding is that adding this: error_reporting( E_ERROR | E_NOTICE | E_PARSE ) Should do the trick. I have added it to wp-config.php and to header.php in my theme. […]

How to debug WordPress correctly?

I’m using a few plugins and UpThemes framework on my new website and if I turn on Wp Debug I can see that there are a few errors related to Deprecated functions (but website is working). What I would like to know is if there is a plugin, a software or a pray (lol) that […]

Where should I tell WordPress where error_log messages should be written?

I have two different instances of the same server (one for development, one for deployment), built independently but basically the same (same OS, same WordPress version, same content etc.). However, I’m confused about the configuration: it looks to me like they’re configured the same (except that the deployment server is told not to write errors/warnings […]

Control verbosity level of WP DEBUG?

I’ve been at a loss so far and so I thought I’d pose the question: Is there a way to modify the verbosity level of the WP debug.log via wp-config.php or elsewhere? Just an fyi, here is what I have in my wp-config.php to enable logging: /////////////////////////////////////////////////// // DEBUG // Enable WP_DEBUG mode define(‘WP_DEBUG’, true); […]

What does this message from WP_DEBUG mean?

I have been having server 500 errors on 3 separate WordPress websites over the last while. (The problem BTW does seems to be related to the wordpress_logged_in***** cookie because deleting that always solves the problem temporarily) but this is not really my question … In the course of investigating this issue I turned on debugging […]

How to check if debug is true and can I use it for my own code?

This question is an exact duplicate of: Disable Debug Log Programmatically 1 answer

How to individually set WP_DEBUG on a sub-directory multisite?

According to this question, it’s possible to turn on/off WP_DEBUG for specific sites on a multisite. Is it possible to do this with a sub-directory multisite?

Prevent notice and warnings in error_reporting?

When turning opn WP_DEBUG and WP_DEBUG_DISPLAY, I get tons of warnings and notices. I have tried to remove the warnings by doing a @ini_set(‘error_reporting’, 1) to only show E_ERROR, but I still get tons of E_NOTICE. Is there someway to prevent all the warnings and notices and only show errors in HTML output?

What is the best way to monitor PHP functions/executions?

I am trying to find the best way to monitor which PHP code/functions, MySQL requests and/or plugins are slowing down pages on a site. I know there are a bunch of different options out there including wordpress plugins and solutions involving firebug (firephp) but what do you guys feel is the best approach? Personally I […]

How to override WP_DEBUG for Ajax responses?

It is highly recommended practice (that I completely agree with) to develop with WP_DEBUG enabled. However it is merely inconvenient to see not yet fixed warnings in pages, but in Ajax responses they ruin response completely. I am just starting with Ajax in WP, is there some appropriate hook to suppress errors for Ajax responses […]