When I tried to delete a custom-made plugin, the admin wordpress page became a plain white screen with no error messages. What causes this to happen?

  • Enable the debug mode and check the error message. define('WP_DEBUG', true);
    – m4n0
    May 11, 2015 at 12:08
  • @ManojKumar I tried that but still isn't showing anything. Still a white screen of death but only to that deletion page, the rest of the admin is still working though. May 11, 2015 at 12:35
  • 1
    What's the URL? wp-admin/??? May 11, 2015 at 13:55
  • Does your theme, for example, use code that depends on the custom plugin, or has the backend been hacked to use that code?
    – s_ha_dum
    May 11, 2015 at 16:17
  • I just found what caused the issue but have no idea why it acted like that. It has this uninstall.php inside that plugin's plugin root directory. I commented all it's contents and still the white screen issue persisted. I deleted the file and now I can now successfully delete the plugin with out that white screen of death. I still have no clue why that happens May 11, 2015 at 17:45

1 Answer 1


While I don't know exactly what code is responsible, your last comment-- " It has this uninstall.php inside that plugin's plugin root directory"-- gives me a pretty good idea of what is happening.

If the plugin can not be written without running code within the plugin, then the plugin should create a file named 'uninstall.php' in the base plugin folder. This file will be called, if it exists, during the uninstall process bypassing the uninstall hook.

When using 'uninstall.php' the plugin should always check for the WP_UNINSTALL_PLUGIN constant, before executing. The WP_UNINSTALL_PLUGIN constant is defined by WordPress at runtime during a plugin uninstall, it will not be present if 'uninstall.php' is requested directly. It will also not be present when using the uninstall hook technique. WP_UNINSTALL_PLUGIN is only defined when a uninstall.php file is found in the plugin folder.


That file either has a syntax error and triggers a fatal error, or it does something to prevent deletion. The later behavior seems a bit malicious to me, but I can't say for sure. If you were to post the code from that file a better answer may be possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.