WordPress white screen of death error (solved)

WordPress Web page Stuck At white screen only? Here the most applicable solution to fix the White Screen of Death Error on wordpress blogs.

While working on a WordPress blog, Website, or After making Some Changes like updating the theme, Update or installing a new plugin the Webpage stuck On white screen? We, Developers, Call This As White Screen of Death (WSOD) Error on WordPress. If you are also getting this Error, Here are some applicable Solutions to Fix the White Screen of Death in WordPress.

This error is very common and is usually easy to fix, and sooner or later every developer encounters it. Also, even though it is named the white screen of death the “death” part of it is a little exaggerated. The content of your site has not gone; it is still in the database, and you can recover it.

What Causes the White Screen of Death? (WSOD)

There are various reasons that this error can occur, but most common ones are the following:

  • Your theme is no longer compatible with one of the installed plugins on your site.
  • If you use shared hosting, the PHP memory limit set by your web hosting provider could be too low.
  • You updated your site to the latest WordPress release, and some poorly coded plugin or currently active template on your site triggers an error.
  • Incompatibility between two or multiple active extensions.

Fix White Screen of Death in WordPress

The first thing you should do is to ask yourself, what was I doing immediately before my site stopped working? There is a good chance that by walking your steps back you will be able to pinpoint the cause of the error.

For example, have you recently updated one of your WordPress plugins or theme? Even a minor update with faulty code can bring down your entire site. That’s a good reason for every website owner to create a testing environment.

You can easily create a testing environment by installing WordPress locally on your system. After that, you just need to import all your contents, themes, and plugins from your main site. Now you can safely try out new or modified themes and plugin updates without breaking your site.

Another reason errors occur can be if you have recently installed a new WordPress plugin or theme. Sometimes plugins can be incompatible with themes and can wreak havoc on your website. Remember that you are trusting the person who created the theme or plugin with thoroughly testing them before deployment, and this doesn’t always happen.

Another consideration is to check that your WordPress hosting provider is not reporting any widespread issues. It’s always possible that there is some other problem affecting websites that your hosting provider maintains.

Regardless of the reason that a white screen has replaced your WordPress site, if you are able to you should carry out a backup before attempting the four troubleshooting tips provided below.

Turn on WP_DEBUG

The first course of action to determine the source of the problem is to output an error message in order to shed some light on the issue. Intending to do so, we will need to turn on WP_DEBUG. Without going to into much detail in this article (but you can learn more on installing WordPress locally), enabling WP_DEBUG tells WordPress to display and log all the errors that take place throughout your installation.

In your wp-config.php file, located in the root directory of your WordPress website, simply find the following line of code:

define('WP_DEBUG', false);

And replace it with the following code snippet:

define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define( 'WP_DEBUG_DISPLAY', false);

The first line turns on the debug mode; the middle line tells WordPress to save your website’s errors in a debug.log file located in the wp-content directory, and the last line tells it not to display errors on your site (scaring your website visitors with error messages is probably not a good idea).

A quick glance at the log file will hopefully help you narrow down the issue. There is a good chance that a faulty plugin, theme or exhausted memory is the culprit behind your White Screen of Death. According to your log file, consider one of the following three options listed below.

Exceeded Memory Limit

Cheap web hosting providers may seem tempting if you are trying to keep costs down, but in the long run, your site could outgrow your provider. In order to maintain their prices as low as possible, low-priced web hosts cram in as many customers as possible on one server. This means that a number of resources (including memory) that each website is allocated is significantly cut down. To solve this problem, you either need to increase your memory limit or upgrade your plan.

To increase your PHP memory limit, in the wp-config.php file, add the following line of code (if the line already exists, simply increase the memory limit):

define('WP_MEMORY_LIMIT', '128M');

A memory limit of 128MB should be sufficient on shared hosts. Remember to reset your Apache server after making this amendment. If this does not increase your PHP memory limit, then you should get in touch with your hosting provider and ask them for help.

Faulty plugins

As a WordPress site owner, over time you are bound to have installed a large collection of plugins, and any one of those could be causing your WSOD.

The first thing to do is to figure out if your website has been affected by a faulty plugin, and the best way to do this is to switch them all off!

Find out first if you have access to your WordPress admin area. If you still have access, then disable all your plugins and then reactivate them again one at a time, testing each one to see if any trigger your site’s error.

If you don’t have access to your WordPress administration area, then you will need to FTP into your site and switch off your plugins manually.

The easiest way to do this is to FTP into your wp-content directory and disable all your plugins by renaming the plugins folder to something like plugins_old.

Rename plugins

Then create an empty folder called plugins and move one plugin at a time from the plugins old folder to your new plugin folder and activate each one individually while testing to see if a plugin breaks your site.

Alternatively, you can turn off plugins individually by visiting the wp-content/plugins directory. Within the list, you will notice various folders that contain your plugins. For each one that you want to disable, rename the plugin folder to nameofplugin_disabled which will automatically disable it. Remember to rename the folder back to its original name, when you want to turn the plugin back on.

If you find the plugin that caused your white screen of death, then perhaps it’s a good idea to delete it or install the latest version if an upgrade is available. It is always a good idea to test plugins on a staging site before adding them to your live site!

Faulty Theme

If your WSOD isn’t caused by a plugin issue, or by increasing your PHP memory limit, then it’s probably down to a faulty theme.

If a theme has been updated or modified and the coding is defective, it can lead to serious faults, including the white screen of death.

Usually, brand-new themes from reputable developers won’t have any incorrect syntax in their code since quality themes are rigorously tested against such problems. But if you get a conflict after installing a new theme, you should disable the theme so that WordPress will automatically revert to its default theme. If you have accidentally deleted the default theme (the twenty-something theme), then you need to download it and upload it back into the wp-content/themes directory.

Another reason could be that if you modified a theme, which has caused an error, then you should replace the modified file with a previous working copy (this is assuming that you have saved a backup). If you haven’t backed it up, then you can always upload a copy from the original theme files.

If you don’t have access to your WordPress administration area, then you will need to disable your theme via FTP. The process is very similar to disabling a plugin. FTP into your wp-content/themes directory and rename your theme’s folder to something like themename_old to deactivate it.

check theme for white screen of death

Once you carried out the above steps, try accessing your site and see if the White Screen of Death error persists. If WSOD vanished, the issue was likely due to a compatibility error between your old theme and your current version of WordPress (since we already discarded the plugin and memory factor).

Of course, no one wants to change themes since it can be quite a headache. Finding, installing and then properly configuring a new template to match your previous website design requires hours of works. But if the issue was a compatibility error with WordPress, then there is a chance that your theme wasn’t well coded, to begin with, and maybe you will want to consider doing business with a more reputable theme developer like Studiopress, Theme forest etc.

The White Screen of Death can be very worrying, partly due to its name. Remember though that your website hasn’t died, and the problem is nearly always due to the issues detailed above.

Plugin and theme conflicts can be avoided by having a testing environment, and it is also essential to ensure that your backup your site on a very regular basis, especially before you make any changes.

Lastly, don’t worry. One way or another you will get rid of the white screen of death. Half the battle is knowing how to troubleshoot, and now that you know how to, your site should be returned to all its glory in a minimal amount of time

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More