You try to activate a plugin you’ve ben developing and instead of seeing what the error is, WordPress displays “Plugin could not be activated because it triggered a fatal error.” Add these defines to your wp_config.php The WP_DISABLE_FATAL_ERROR_HANDLER may not work, but your will see the error causing the issue written to: httpdocs/wp-content/debug.log
Category: Errors
wp_error
Checking success for a function that can return wp_error