White Screen of Death in WordPress
Have you ever found yourself staring at a blank screen upon opening your WordPress site? Everything was working fine just a moment ago, and suddenly the site turned blank! It could also be that the WordPress site is loading fine, but the dashboard isn’t. Situations like this what the WordPress community likes to call the infamous White Screen of Death – and it’s one of the most unsettling things about WordPress.
If you haven’t come across this term yet – then you’re one of the lucky ones. Today we’ll talk about the various symptoms of the White Screen of Death (let’s call it WSOD), and learn the cure for each ailment.
4 Reasons Cause WordPress White Screen of Death
The chances of your WSOD incident falling into the unknown category is quite slim. Most often, the cause of the WSOD falls under three general categories. This tutorial outlines simple, and easy to follow steps to fix each of the causes for WordPress White Screen of Death.
Reason 1: Plugin Related Issues
You installed a new plugin, updated an old one or tried to modify an active one.
In most cases, there could be a conflict between your current active theme and the plugin you just installed. In such a case, you could simply disable that particular plugin and everything should work just fine. However, there’s a problem. How are you going to disable the plugin when your WordPress dashboard isn’t working?
If you’ve been using WordPress for over half a year now, don’t read the next line. Try to think of a solution. I’ll give you a hint – it’s got something to do with accessing your WordPress plugin directory via FTP? Have you got it? Yes? Kudos! No? No problem – read on, but I promise that you’ll be slapping your forehead once you read the solution! Here we go.
How to Disable WordPress Plugin via FTP?
Disabling a WordPress plugin via FTP is a really simple task. As a prerequisite, you must have FTP access, with the correct permissions to your WordPress directory.
NOTE: Most hosting providers give you FTP access. However, if you’ve installed WordPress in a VPS or a cloud server, there is a chance that you haven’t installed an FTP server in your VPS. In such a situation, you will need to install an open-source FTP client such as proftpd or vsftp. There are multiple tutorials online, and I suggest you read one which uses your server’s operating system. For example, if we’re running a VPS based on Ubuntu, our search term would be “How to install proftpd on Ubuntu”.
Once you have that step cleared, it’s time to disable the plugin.
- Login to your FTP server a proper account
- Navigate to your WordPress installation directory
- Enter the the wp_content/plugins folder
- You’ll find multiple folders with familiar names inside the plugins folder. Each folder represents a plugin.
- Find and select the folder with the correct plugin name
- Rename it to a different yet recognizable name. For instance, if the plugin’s (i.e. folder’s) name is akismet, then you should rename it to something like _akismet or akismet_disabled.
- You’re free to choose any name you want. Just make sure that it doesn’t collide with another plugin’s name and is later recognizable.
- Renaming the folder will permanently disable the plugin.
Once you’ve completed these steps, fire up your browser and see if the site loads. If the problem is solved – kudos!
How to Disable All WordPress Plugins at Once?
You can follow the above process to disable as many plugins as you want. However, if you want to disable all plugins at one go, then this would take a lot of time. There’s a much easier way – rename the plugins folder (to something like plugins_old) and create a new, empty folder labelled plugins. In essence, this would disable all the old plugins in one go. You can move the plugins one by one from the plugins_old folder to plugins, and activate them individually.
When you’ve modified a particular plugin file which caused the WSOD, then simply disable the plugin via FTP and the site should be working again. It is always a good practice to test modified plugins on a backup site.
Reason 2: Theme Related Issues
Similar to plugins, theme related WSOD problems have similar origins. Let’s take a look at some of the simplest causes:
New Theme Installations
Installing a new theme could create a conflict with an existing plugin – the classic theme-plugin conflict. In such a case, you simply need to disable the newly activated theme and WordPress would automatically revert to its default theme. Make sure you haven’t deleted the default theme (the twenty-something theme). If you have, upload the theme to the themes folder in wp_content.
How to Disable a Theme via FTP in WordPress?
This process is almost similar to the process of disabling a plugin, the only difference being that you need to open the wp_content/themes folder instead of the plugins folder. Navigate to the themes folder and rename the specific theme’s folder to deactivate it.
Poorly Coded Themes
Many a times, major WordPress updates could drive poorly coded themes down the river. A poorly coded and outdated theme might not work with the latest update of WordPress.
If your theme has stopped working right after you updated WordPress, there’s a strong chance that the theme is the culprit. Deactivate the theme and things should go back to normal.
Modifying a Theme
WordPress does not like buggy code. It relies on a set of well-constructed objects of code, working in harmony. If one of those parts (not to be confused with an object of OOP), say the theme’s functions.php file, malfunctions, then WordPress will not work. This leads to the WSOD.
Usually, themes from the WordPress repository or reputed developers are meticulously tested against such defects. A theme straight out of the box would not have a malfunctioning functions.php file. If you get a WSOD when you install such a theme, it’s most probably a plugin-theme conflict.
When you modify or update a theme, it could lead to improper code, which drives us to the heart of the problem, i.e. a WSOD. In order to fix this, you could replace the modified file with an old copy (I’m assuming you’ve taken a backup). In any other case, you could upload the original theme files.
Reason 3: Exceeding the Memory Limit
This situation is a classic indicator that you’ve outgrown your current hosting provider. The amount of traffic in your website requires more resources – which your current host cannot provide. It’s time for an upgrade. That’s good news – your site’s growin’
You could try increasing your PHP memory limit by modifying the wp-config.php file. Simply add the following line:
A memory limit of 64MB should be sufficient on shared hosts. If the problem still persists, you should consult your hosting provider.
Cheap Web Hosts
This problem is also common in cheap webhosts that sacrifice quality. In order to make a profit, these hosts cramp in as many customers in one server as possible. As a result, the amount of resources (for example, RAM) per client is significantly reduced. This leads to the WSOD. So if you are on a budget hosting plan that won’t allow your to increase your memory limit any more, you’re going to have to upgrade your plan.
Reason 4: Unknown Causes
Sometimes, the WSOD cause cannot be quite determined, which leads us into a fix. In times like these, you will need to determine the source of the problem.
Simply add the following lines at the bottom of the wp-config.php file:
error_reporting(E_ALL); ini_set('display_errors', 1); define( 'WP_DEBUG', true);
This tells WordPress to display all the errors that take place on the output screen. You can use this information to determine the cause of the WSOD.
The White Screen of Death is one of those unavoidable problems that every WordPress user must face. If you haven’t come across this term yet – then you’re one of the lucky ones. But you can still collect this article in case it happen.