Skip to content

Instantly share code, notes, and snippets.

@rachelbaker
Created January 16, 2013 14:49
Show Gist options
  • Save rachelbaker/4547618 to your computer and use it in GitHub Desktop.
Save rachelbaker/4547618 to your computer and use it in GitHub Desktop.
Debug WordPress plugin activation errors
/**
* Find unexpected output error during plugin activation.
* Writes file to /uploads/debug_report.html with buffer output.
*
* @author Rachel Baker <[email protected]>
*/
function debugActivationError(){
file_put_contents(ABSPATH. 'wp-content/uploads/debug_report.html', ob_get_contents());
}
add_action('activated_plugin','debugActivationError');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment