Fixing white screens in WordPress

I got the white screen of death last week, but it was odd—it only happened if I tried to edit posts that were in draft or scheduled status. Already-published content would edit fine. Here’s my experience fixing white screens in WordPress.

Clearing my cache helped temporarily, but the problem would come back as soon as I saved a post. I ended up doing two other things as well, and then the problem went away. I emptied my spam, which also greatly sped up the site, and I also deleted a mobile plugin that I was no longer using but was disabled. Disabled plugins can still affect behavior sometimes.

One thing to keep in mind is that white screens aren’t normal. Frequently they are a sign of a malware infection. The best thing to do after getting a white screen is to search your WordPress directory for suspicious PHP, and restore any suspicious-looking file from backup, or uninstall and reinstall whatever plugin the file happens to be part of. If you’re ambitious, you can reverse the PHP to see what it does.

In hopes of preventing future white screens, I installed the All-in-One WP Security and Firewall plugin, which I wrote about yesterday. Some security professionals recommend Ithemes Security, but All-in-One seems to be less invasive. The Jetpack plugin also has some security features to block some malicious attacks, so I recommend it as well. Setting plugins to auto-update also helps. If a plugin hasn’t been updated in many years and seems to be abandoned, consider replacing it with one that gets regular updates.

These measures can slow your site down, but the right amount of security will actually make your site faster by preventing malicious traffic, and keeping unnecessary PHP code from running. There’s no point in running PHP code if it’s not in response to a living, breathing reader.

Of course, finding that balance can be a little tricky.

%d bloggers like this:
WordPress Appliance - Powered by TurnKey Linux