How do I debug a fatal error activating a plugin?
-
I have a simple, one file plugin. On trying to activate the plugin I get a message “Plugin could not be activated because it triggered a fatal error.”.
I’ve verified that it is not a syntax error by checking the file on the command line with php -l.
Nothing is written to the server’s PHP error log. I have verified that the server’s error log works correctly – for example, if I drop a test.php file in wordpress’s root directory containing:
<?php $foo = new NonExistantClass();
and browse it the fatal error gets logged correctly as expected.
I tried enabling WP_DEBUG in wordpress’ config. Doing that changed nothing in what was displayed in the browser error or what was logged. I also tried setting WP_DEBUG_LOG. This also did not log anything when trying to activate the plugin.
How do I get useful information about what’s going wrong? How can I get a log somewhere, anywhere, that details what the fatal error is?
- The topic ‘How do I debug a fatal error activating a plugin?’ is closed to new replies.