In this Set WordPress how-to, I am going share the way I fixed the WordPress white screen of death caused by WP-Super-Cache.
This is something that no one wants to run in to, not in the middle of the night when there is not much traffic, neither in the afternoon when tons of people are pouring in to your site.
For the lucky few that don’t know about what is, the WordPress white screen of death (a.k.a WordPress blank screen of death) is a problem that when you go to site or try to log in and all of a sudden there is nothing else that a blank page, white page, nothing page, etc, and we all start freaking out.
First, there are many reasons for this to happen, today I am going to be detailing the problem I had with the WP-Super-Cache and how did I fixed it.
Alright, I had the WordPress white screen of death, the first thing I did was to connect via FTP to my site, then because when people are visiting your site they are presented with the cache version of the page they want to see, I thought on troubleshooting the WP-Super-Cache plugin. I browsed to the \wp-content\plugins, and I re-named the wp-super-cache directory to wp-super-cache2. Once I done that I went back to the site, I refreshed and the website was working again, kind of slow but started working; right then I knew were the problem was.
I also found, doing research online, that many times this happens if wp-config.php — that is located in your WordPress root directory — has empty spaces between lines. So I made a copy of the file, I deleted all the empty lines, and I uploaded the file back to the web server. I went back to the plugins’ directory and change the wp-super-cache2 to its original name wp-super-cache, then I tried to load the website without any luck — this didn’t fix the problem, but this is still something that you need to check, because it may work for you. Once again I renamed the plugin directory to wp-super-cache2 before going to the next troubleshooting step, that way people can still be able to load pages in the site.
Now, this is when you realize that always having a backup of your site is powerful tool.
If you noticed inside the wp-super-cache directory there is a file called readme.txt, this file contains a of information, plus troubleshooting tips for this plugin. One of these tips was to check the wp-cache-config.php file — located outside the plugins’ directory –. I opened the file and it looked good to me, then I thought: what about if I compare this file with the one from a previous backup? Next, I open both files side by side and something caught my eyes, the wp-cache-config.php file that I just downloaded from my site had 118 lines of code and the file from backup had 122 lines of code — I still don’t know why there were some lines of code missing, I never heard about this file before and I never edited –. So I uploaded the wp-cache-config.php from backup to the wp-content directory overwriting the current file on the web server. Finally, I went back to the \wp-content\plugins directory and I renamed wp-super-cache2 to wp-super-cache, I refreshed the site and it worked!
The way you know is working is because, of course, you refresh the your site and is loading correctly, but also because you will see a lot of html files when the check the \wp-content\cache directory.
So what did I learned out of all this? Backup is really important, you never know when things are going to go wrong and it is a matter of time until something goes wrong. Be smart and be prepared. And also now I know how to fix the WordPress white screen of death.