Troubleshooting White Screen of Death on WordPress

Sometimes when you install a wordpress plugin and click on “activate” you may get a white screen immediately and there is no way to go back and change it or to disable it. For that matter, you will be unable to even login to your wordpress site as there will only be white screen everywhere. When this first happened to me I really panicked. But ultimately I found a solution.

Causes:: As mentioned this white screen usually appears after you install a plugin or change some php code somewhere and there is no way you can undo it normally like we do.

Solution: : There is only one way to fix this. You need to login to your FTP client where your site is hosted. You can use a software like Filezilla for this purpose. Steps I took to resolve the WordPress White Scren of Death.

1. Opened a FTP client using Filezilla.
2. Connected to Website FTP.
3. Go to: WP-Content folder.
4. Rename “Plugins” Folder to “Plugins_Old”.
5. Create new empty folder called “plugins”
6. This will disable all the WordPress plugins.
7. Log into WordPress and verify that you no longer have the White Screen.
8. Make sure all plugins are disabled.
9. Delete “plugins” folder you just created.
10. Rename “plugins_old” to “plugins”.
11. Log back into WordPress.
12. Enable plugins one at a time to see which one was causing the issue.

OR

If you know which plugin caused the problem you can just rename that particular plugin folder in step 10 under the “plugins” folder and follow the next few steps. Even a PHP syntax error can cause a white screen so make sure you know what you are doing before modifying PHP code….

How to add PHP scripts to WordPress posts and pages!

Including a PHP script in your WordPress Post or a Page as compared to in Sidebar Widget is possible. All you need to do is install a wordpress plugin which makes execution of PHP possible. In my case I installed a plugin called PHP Execution. I can now include any PHP script within a post or page. I was able to install a small PHP script in the Header.php which displays current time and date at the top of the template. Here is how you can implement it. Goto Header.php and insert this small PHP code:

<?php
print strftime(‘%c’);
?>

NOTE: Installing this plugin (and any other PHP execution plugin) is an open invitation to hackers as they can post scripts as comments. Please know what you are doing before installing.