WordPress White Screen Of Death (WSOD) caused by W3 Total Cache
Last night I migrated my websites to a VPS server on pair.com and one of my websites ended up showing the dreaded WordPress White Screen Of Death (WSOD).
I was using the latest version of W3 Total Cache (0.9.2.4) and CloudFlare on the website, and was not sure why I got the WSOD. I was able to view html and php files on the same website fine, but WordPress files just showed the white screen of death on the front end of the website.
Both the domain name which goes through the CloudFlare system as well as my dedicated IP address for the website which by-passes the CloudFlare system, showed both the WSOD, so I could rule out CloudFlare.
The Admin backend was still functional, so I went and cleared the W3TC cache, but nothing changed, still a white homepage. I then started by disabling plugins in WordPress to see what could cause the WSOD.
As soon as I deactivated W3 Total Cache I got a “Parse error: syntax error, unexpected T_STRING in /……./wp-config.php on line 17“.
I looked in the wp-config.php and on line 17 was the define(‘DB_NAME’, ”); code. everything looked fine, but it still was giving me the error.
After examining an older copy of the wp-config.php, I could see that W3 Total Cache removed it’s own code from the wp-config.sys and pushed the default comment field right into the <?php syntax.
By moving the start of the comment to a new line solved the parse error.
After fixing the parse error and having CloudFlare in Development Mode as well trying my direct IP address to the website, I was able to see that the site loaded again and no issue with WSOD.
I am not sure why W3TC gave me the WSOD, but after uninstalling it and re-installing it and then removing some of the options that I had on my previous settings, it now seems to work. I am still investigating which setting that caused WordPress to display the WSOD.
I also would like to mention that Pair.com support was also very helpful, checking my settings and helping me re-syncing the the new site with my old content when experiencing the issues.