How to fix WordPress White screen of death error

Posted by & filed under Troubleshooting, WordPress.

White screen of death

If you have a WordPress website and you’ve been doing it for a long time, then you have definitely seen the WordPress white screen error. This is a very unpleasant thing. You are trying to open a page of the site, and in response, you see only a white screen, it can be on absolutely all pages of the site, in the admin panel and so on. The worst thing here is that it’s unclear what to do and how to solve the problem, when you can’t even access the wp-admin section.

In this article, we’ll look at what a WordPress white screen is, why it appears, and how to fix it. And it needs to be fixed quickly.

What is a white screen of Death?

This screen got its name due to Windows blue death screen, which, probably, everyone remembers.

White screen of death

In some respects, Microsoft’s blue screen and the WordPress white screen are similar. Both of them notify that something went wrong, but there are no errors on the WordPress screen. Apparently, the error appears at an early stage of the page generation, and the page itself has not yet loaded and will not be displayed accordingly. The ‘WP_Debug’ mode to display the errors and warnings on screen is disabled in WordPress by default so that your users do not see anything unnecessary.

White screen of Death : Causes

A lot of possible reasons can cause the WordPress white screen, here are some of them:

  • You updated the WordPress and the update was not completed correctly or stopped in between
  • A new or an updated or changed plugin causes the error.
  • The installed theme is causing the error.
  • There is a conflict between the plugins or theme
  • An error in the database;
  • Problems with page caching.

Now that we know the possible causes of the problem, let’s look at these in more detail and see how we can fix the White screen of Death error.

How to fix a WordPress white screen Error ?

Ideally, you should have a full access to the server root, where the site is hosted via the SSH, but this method is for experienced users. If you are not comfortable with dealing with Command line, we advise using FTP  or SFTP to access the site files and folders. You will require a FTP file manager like FileZilla or you can even use the online file manager provided by your hosting company. The best FTP manager is FileZilla in our experience. It connects in seconds and works reliably. So we will be using that in our examples here.

Many instructions write that immediately you need to disable all plug-ins, recently installed themes, cache, file rights and many more. You can check all this for hours. But why all this if you can immediately see what was the problem. To do this, enable WordPress debugging mode and reload the page. In most cases, the system will display a few errors and you can start with them. So, how to do that?

 

1. Debugging mode

If you already installed FileZilla on your local computer, connect to the server. You can find the FTP login and password from your hosting control panel. If you cannot find it, please contact the technical support, they will have to help you.

Next, find the ‘wp-config.php’ file in the site’s root directory and inside that, look for the following line:

define(‘WP_DEBUG’, false);

Change it to the following:

define(‘WP_DEBUG’, true);

White screen of death

Save the changes and clear any caching on the server, as well as your browser cache. If you are using Managed hosting, you might also find the ability to access the site’s error logs. You can see the same information in the error logs of the site.

White screen of death

Here already, most likely, you will see what’s the matter there and why you see the WordPress white screen. And now you can act according to the displayed errors. For example, if you see the problem with connection to the database, you can fix it, if you have problems with some plugin or theme, you can turn it off or clear the cache if the problem is there.

White screen of death

If you see an error related to a plugin, you can deactivate the plugin by changing it’s folder name via FTP and then clearing the site cache and trying again.

White screen of death

In case you see an error related to the theme. You can change the name of the folder of the theme which is giving the error and then you can log in to the wp-admin section and change the theme to a temporary theme.

2. Deactivate plugins

After looking at the error messages or trying the above method, does not fix the Error, then the first thing you can try is to disable all the plugins installed on the site. If you have access to the admin panel, sometimes it happens, try open the address wp-admin, then you can do it. If not then you can access the site via FTP and rename the ‘wp-content/plugins‘ folder to something like ‘plugins_old‘.

White screen of death

If now the site loads, it will probably be broken because there are no plugins activated, but it means that the fault lies in one or more of the plugins. You can then rename the plugins folder back to it’s original name and activate the plugins one by one to find the plugin at fault.

 

3. Choose the default theme

Sometimes the origin of the problem can be the WordPress theme. The easiest way to check this is to use the default theme. If you rename the folder with the current theme, WordPress will automatically start using the default theme if it is installed.

White screen of death

If you do not have the default theme installed you can download it from the WordPress site and copy the folder to the site’s themes folder. You can also install or activate the default theme from the wp-admin section, if you can access it.

4. Clear cache

Caching can also sometimes cause such problems specially if the site is newly migrated from another server. In that case, even debugging may not help. But if you are using a caching plugin, the problem might be solved by disabling the plugin and then deleting the cache folder, if it exists, in the ‘wp-content‘ folder of the site

White screen of death

If not, then you can also try to clear the server cache.

5. Database

As WordPress uses PHP and MySQL, alot of the data is stored in the database. So, if something goes wrong with the database, your website will not function properly. Try to use the Adminer or phpMyAdmin to access the database and view the tables.

Check if all the WordPress tables exist in the database or not.

White screen of death

Next see the table prefix which is set before each table name. For example if the tables are named like ‘wp_options‘ or ‘wp_posts‘ that means that the table prefix is ‘wp_‘. Access the ‘wp-config.php file and confirm if it is using the same table prefix as that you see in the database.

White screen of death

Sometimes the database works okay, but the server’s disk might be full or one of the other services on the server might not be configured properly. To fix that, contact your hosting provider technical support.

6. File permissions

If your site is hosted on an Ubuntu server, then you can try this fix as well. Linux has a very flexible permissions system, it allows you to specify which users can access which files. Why Linux? Most servers today use this operating system, so it may be very essential to give the right permission to the files and folders. The same goes for services. If the web server or the PHP interpreter does not have the correct permission to read the WordPress files, then you will not be able to open the site. The correct permissions for the WordPress files and directories are:

  • All files – 644;
  • All folders – 744;
  • File wp-config.php – 660;

The best way to set up permissions is to use online file manager or one provided by your hosting company or yo ucan use the FTP Client like Filezilla as well.

White screen of death

Once you open the directory where the WordPress files and directories are placed, simply right click the file or directory whose permissions you wish to change and click on the ‘File Permissions’ button and change the permissions.

 

7. Server limitations

Perhaps, the server lacks the available RAM to generate the page and display it on the screen. This can be due to the very strict limitations of the web server. Most often it happens in cheap plans or when the server is not properly configured. To increase the amount of available memory, add this line to the “wp-config.php” file:

define (‘WP_MEMORY_LIMIT’, ‘256M’);

256 megabytes is an average amount of memory to provide the smooth work.

White screen of death

Along with this you would also have to update the ‘memory_limit ‘ value in the php.ini file on your server. If you are on a Managed Hosting, you can also contact your hosting provider to do this.

8. The corrupted update

The WordPress white screen error may be caused by an unsuccessful update, for example, due to the server’s timeout. Check if there is a “.maintenance” file in the root folder. This WordPress file is created just for the update period. If the update was completed, but the file was not deleted, then you can delete it manually, if the update was not performed, you may need to update WordPress manually.

 

In this article, we have examined what is a WordPress white screen error, why it happens and how to solve it. The cause of this error can be other problems, for example, the site caught a virus, problems with hosting provider, DNS error, etc. But the reasons considered in the article are most obvious. If you have any questions, ask in the comments!

Leave a Reply