• I’ve created a custom plugin and am trying to activate it on my development system. WordPress is installed at C:\inetpub\wwwroot\wordpress with PHP 7.1 installed in C:\PHP and IIS running FastCGI. I use PHPStorm as my IDE and XDebug is configured as well.

    How do I get further information about the error in the subject line? I’ve told PHPStorm to listen for debug sessions and clicked the Start Debugger in the Favorites portion of the browser bar. However, I’m still unable to find details about the plugin activation failure.

    Is there a log file, debug tool, or another interface that I need to check to determine root cause of the error? If not, what must be modified within the above tools to gain more information?

    Thanks for your help and guidance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Most servers have log files available. Apart from that you can try setting WP_DEBUG to ‘true’ in your wp-config.php file and that should show you more about the actual error.

    If none of that hepls too much the way to do it is to comment out things in your plugins code until it starts working. From there you can see where the error is and investigate more.

    Moderator bcworkz

    (@bcworkz)

    Really the same as catacaustic’s commenting out, but a different approach. Define WP_DEBUG as true in wp-config.php. Create a virtually blank plugin and activate it. Edit the plugin file to add in your actual plugin code. When you make a WP request now, every error encountered will generate PHP error messages. Fix the errors as encountered.

    This approach will crash your site when fatal errors are encountered. They are usually easily fixed once you know what and where the error is. I’m assuming you are developing locally or are using external means to edit plugin files since you cannot rely on WP being functional in order to access your files.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Plugin could not be activated because it Triggered a Fatal Error’ is closed to new replies.