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? 2 s 2 You can do this by adding some code to wp-config.php $request_uri = $_SERVER[‘REQUEST_URI’]; $debug_dirs = array (‘/debug-dir1/’,’/debug-dir2/’); // list of directories to turn on debugging foreach … Read more

Hide php Notices in Dashboard

When I program a theme, I put WP-DEBUG on. Which ensure a proper PHP code. Sadly most Plugin developers keep using non existing vars : echo $args[‘title’]; Notice: Undefined index: title in /wp-content/plugins/easy-fancybox/easy-fancybox.php on line 301 Instead of echo ( isset($args[‘title’]) ? $args[‘title’] : ” ); So I permanently get tens of Notice errors with … Read more

Debug.log file is never created?

It’s the first I have seen this. In a project I’m working on, I tried to switch on the debug mode for wordpress to see logs. Even if I activate the debug_log in wp-config.php, debug.log file is never created in /htdocs/wp-content/ wp-config.php define(‘WP_DEBUG’, true); define(‘WP_DEBUG_LOG’, true); define(‘WP_DEBUG_DISPLAY’, false); @ini_set(‘display_errors’,0); define(‘SCRIPT_DEBUG’, true); wp-content dir rights load.php … Read more

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. … Read more

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); … Read more