I’m working on a small plugin and on some WP installations it throws up the white screen of death.
I’m new to this, and would like to know if there is a decent guide out to there (so far my googling over the white screen of death hasn’t turned up anything for developers), or some best practices I should be following to make sure I catch errors or avoid anything foolish.
Any and all links or tips would be massively appreciated.
A white screen of death is typically a fatal PHP error, most of the time due to a syntax error. This often sends no errors to the browser.
Some things you can do:
Turn on PHP
error_log
in your php.ini file and set theerror_reporting
levels.http://php.net/manual/en/errorfunc.configuration.php
Error info: http://www.php.net/manual/en/errorfunc.constants.php
Alternatively or in combination you can turn this on in your wp-config as well (from wordpress codex).
http://codex.wordpress.org/Editing_wp-config.php
Turn on WordPress debugging and saved queries, (wp debug is same as above example) in your wp-config.php.
And install the debug bar, http://wordpress.org/extend/plugins/debug-bar/
I also recommend using something like xDebug,