Scratching Head

Managing WP_DEBUG Values in WordPress

I was on the struggle bus and noticed that E_STRICT errors were plaguing my WordPress install. Regardless of all the usual php.ini configuration stuff, virtualhost configuration stuff and .htaccess hacks — this was becoming a real headache.

First thing you should look out for in these situations, is deactivate all plugins. Why? That’s a great question! There are authors of plugins out there right now setting error_reporting values in their code. Which they shouldn’t be doing. It makes debugging websites incredibly difficult.

After that, if you are still having issues. Then you can try the following, which I had read from wycks.

In your wp-content folder create a new folder called mu-plugins and in that folder create a php file with the error level you want…

This is a very important concept. Basically, you can get the final word in on the error reporting level by leveraging the mu-plugins method.

What ended up solving my problem was creating the following file: /wp-content/mu-plugins/error.php

Then filling it with this:

No more errors, yay!

 

Leave a Reply