PHP / WordPress — Enable Debugging, Log Writing, etc.

This is my first time messing around with PHP, making a plugin based on other plugins to try to understand how PHP works.

I really needed debugging enabled though. WordPress defaults to a blank white screen of death if any errors are posted.

I went through 10 different ideas for displaying debug messages all the way to php. It turns out all you need enabled are a few options in wp-config.php for wordpress display the errors.

The big problem for googling this answer is that only this post has the KEY that I needed: “WP_DEBUG_DISPLAY”

WP_DEBUG alone didn’t do it, moving php.ini to my user on dreamhost and enabling errors didn’t do it..

So that’s it:

define(‘WP_DEBUG’, true);

define(‘WP_DEBUG_DISPLAY’, true);

The php.ini settings may be required as well, but the bottom line is WP_DEBUG_DISPLAY.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s