How to Fix White Screen of Death in WordPress. How to overcome the WordPress white screen

Sometimes the process of installing a new WordPress themes can end quite unexpectedly: instead of a bright, attractive website, the developer is faced with a blank page, and it is often impossible to switch to another topic, since access to the admin panel is closed. What to do in this case and how to cope with the problems that arise?

First of all, you need to understand what caused this error and why the WordPress theme did not load properly. This may occur as a result of the following reasons:

  • Theme files contain an error
  • The theme accesses functions or special sections of code not present on your site
  • The selected theme is not compatible with your server, WordPress or PHP version
  • Plugins cause a conflict or contain an error
  • Your server is not configured correctly

If WordPress returns a blank page, it means that an error occurred during the theme installation process, causing the site to stop working correctly. The display of a blank page was made to prevent site visitors from seeing messages indicating an error. This technique is called PHP Error Reporting; it was designed to prevent websites from displaying error codes. Instead, the code returns absolutely nothing, which results in a blank page being displayed. Despite the fact that this approach is technically correct, it can lead site creators to a dead end.

Error display

The first thing you will need to do to repair your WordPress theme is to try to read the error report that occurred in the PHP files, which will allow you to determine what the problem was. Most websites have this setting disabled by default to prevent visitors from seeing the code, but if your WordPress site becomes corrupted, you'll need to figure out what caused it to happen.

Open your FTP client and find your theme files (they are located in the /wp-content/themes/ folder). Add the following lines to the beginning of the header.php file:

Error_reporting(E_ALL); ini_set('display_errors',"On');

Now, if you update your site, you will see an error message from which you can determine which file is corrupted on your WordPress site.

Correcting files located on the server

Once you add error handling code to your site, you will be able to see a detailed report of how the theme files were corrupted. However, if the error is in the server configuration, you still won't get anything on the screen. There are two most common reasons for this type of error. Both reasons are related to files located in the root directory of the site.

The first of these files, PHP.ini, allows you to override the settings of your site. Using php.ini you can increase memory or set timeouts for files. Editing this file by website owners may result in unplanned server errors. Make a copy of this file on your computer and delete it on the server to see if this is the problem.

Htaccess is the second file, editing of which can also lead to server failures. As with php.ini, make a backup of this file and delete or rename it on the server. Perhaps this will help solve the problem.

Restoring a default website theme

If your website starts displaying a blank page, the first thing you should try is to restore the default WordPress theme using an FTP client. After removing the problematic theme, WordPress will revert to the default theme (Twenty Ten, or another similar one), and your site will be available again. You don't need to delete the entire topic. Instead, you can simply rename the theme folder. Theme files are located in the root directory /wp-content/themes/, where each theme is stored in its own unique folder.

Once you rename or delete the offending theme, your site should revert to the default theme. If this does not happen, the problem may be with the plugins, so you will have to go through a similar process to deactivate the plugins.

Deactivating WordPress plugins to restore the site

Now that you have realized that the problem is not with the theme, but with the plugins, it’s time to start deactivating them to try to restore the functionality of the site. Deactivating plugins without access to the WordPress admin panel tools can be done via FTP, similar to how we deactivated a theme. Plugin files are located in the root folder /wp-content/plugins/ and can be stored either in subfolders or as separate files.

If you know approximately which plugin is problematic, you can rename or delete the folder with it (I recommend making a local copy of them first, so that you can restore these plugins if something happens). Once you delete or rename the plugin folder, try reloading your site. Ultimately, you should find the culprit and find out which plugin caused the error.

Troubleshooting WordPress Core Issues

In very rare cases, the problem may lie outside the boundaries of your theme, plugins, and server configuration. In such a situation the most better solution- this is downloading the latest current version of WordPress from the official website and overwriting files located on the server.

Hi all. Lately there have been a lot of questions from users about the white screen of death in WordPress. I was tired of answering everyone and decided to write a short article.

The main goal of this article is to show you what you need to do if you have a white screen, and also tell you how to easily turn it on error output in wordpress.

Page navigation:

White screen wordpress

The problem is when the user sees white screen in wordpress instead of its own site, it’s not new, and has been discussed many, many times. The main reason for its occurrence is critical errors in php, but since in 90% of cases errors on the site are disabled, instead of an error we see a white screen.

Another reason for a white screen may be crooked plugins and themes. For example, it is enough to not carefully insert the following code

And you are guaranteed to see a white WordPress screen.

WordPress white screen in admin area

It’s bad when the client side of the site crashed, but it’s even worse if we crashed or they helped us crash the WordPress admin area. In this case, access to the settings and the theme editor will be impossible.

It’s very easy to create a white screen in the WordPress admin area; for example, you can edit the theme’s functions.php file, make a mistake in the code (forgetting to close a bracket or installing an extra one) and saving the changes. Voila, the WordPress white screen error in the admin panel is guaranteed. By the way, such a childhood mistake cannot be cured without access to the site via FTP or a file editor from the hosting panel :)

What to do if there is a white screen on the WordPress site?

You need to enable errors and diagnose the problem.

How to enable wordpress error output

Follow step by step instructions by clicking on the numbers 1 2 3 in the switch below:

How to get rid of WordPress errors

Let's assume you have enabled output wordpress errors, your white screen has become a screen with error text, what do we do next?

We need to try to eliminate the error!!!

We look at the text of the error, it will indicate the path to the file where the error occurred and the line, for example, I once again closed the ) bracket in the functions.php file, for this I get the following error:

Parse error: syntax error, unexpected ")" in /home/c/site/site.bget.ru/public_html/wp-content/themes/twentyfifteen/functions.php on line 2

We have the path to the file, we also go to the line and correct the error.

Of course, this is the simplest example; there are much worse situations. For example, you installed a crooked plugin and it blocked your entire site along with the admin panel, what should you do, how can you disable it?

Quite simply, from the error we look at the name of the plugin, let’s say “wp-plagin-bag-ru” go to FTP and go to the “wp-content” -> “plugins” folder and find there the directory name “wp-plagin-bag-ru” " and rename it to anything, for example to "wp-plagin-bag-ru__".

If it was a malicious plugin, then we disabled it and the site should start working normally.

Of course, you can give examples for a very long time and still, there will be a unique case that I have not described. For such cases, we have a Question/Answer section on our website, where you can write the error that your site gives, and we will be happy to try to help you. Also, you can describe the problem in the comments and we will answer you as quickly as possible.

There are usually few reasons why a white page may be displayed instead of a website instead of WordPress.
In order:

PHP errors in scripts.

Traditionally, on the web servers of hosting providers, the display of some errors that occur during the operation of scripts is disabled.

There are three ways to enable web server error output (which one to choose depends only on the specific situation and capabilities)

  • Open the php.ini file for editing and change the value of the error_reporting variable to E_ALL: error_reporting = E_ALL
  • In the .htaccess file (which is in the folder of the problematic site) write two lines: php_flag display_errors on php_flag display_startup_errors on
  • The third method for shared hosting is just ask technical support - how can you enable error output? 🙂 Since this is often done through the hosting control panel.

Errors in the work of WordPress itself.

Another reason for the error may be internal errors and conflicts itself CMS WordPress. You can see the error by replacing in the file wp-config.php line define('WP_DEBUG', false); on

Define("WP_DEBUG", true);

All sorts of other errors.

  • Another very popular mistake (especially when installing new themes or moving sites) is that the site files are not fully downloaded. If you are very “lucky”, you will see just a white screen without any errors - and even if you crack! The only thing that helps is downloading the files again.
  • Another white page may appear after editing site files with an editor who does not know how to work correctly with UTF-8 encoding. Treatment - redownload the site files or restore from a backup.
  • If for some reason, instead of opening the usual WordPress admin pages, you get a blank page, first of all you need to rename the directory plugins(it is located in the /wp-content/ folder) on the server, for example in plugins_old. (added by user Vadim )
  • Also, a white page can be caused by caching plugins. In this case, it’s worth finding and clearing the cache (usually the cache folder is located in /wp-content or /wp-content/caching_plugin_name). ( Thanks comrade Spectra! )

by admin on August 26, 2011

Yesterday I encountered a problem with a blank page when logging into a blog on WordPress. That is, when I go to my website, white is displayed empty page and nothing more. This problem among WordPress users is also called “white screen of death”.

In my case a white page when entering the site was displayed when the site was accessed from WWW. When you write a site without WWW, the site displays normally.
That is, for example www.. And the site is everything OK.
Empty page may also appear after you have published a post or activated a plugin. That is, instead of returning you to the admin page with confirmation of changes, a blank page is displayed.
It also happens when neither the site nor the WordPress admin panel open at all. There is no error message, just a white screen.
Don't worry, all this can be fixed.

Blank WordPress page

The most common causes of a white screen in WordPress

1) Extra spaces in the wp-config.php file
Solution: remove extra spaces at the end of the wp-config.php file, after ?>
2) Extra spaces or something wrong in wp-settings.php
Solution: Same as point 1.
3) New installed plugin not compatible with anything else already installed in Wodpress
Solution: Disable the plugin and check if this solves the problem. If you are not sure after installing which plugin the problem appeared, start disabling the plugins one by one and check each time whether the site is working.
4) You have updated your WordPress version
Solution: Try updating WordPress again, if this does not help, see the previous points.

Extra spaces wp-config.php

In my case the problem was extra spaces at the end of the wp-config.php file That is, after ?> I had to remove all the extra spaces.
This helped solve the problem.

Backup

With another site everything turned out to be more complicated. I tried all the above solutions, but it didn't help. Then I went to the website of my hosting provider, went to the Backup section, and made a backup of the wp-config.php and wp-settings.php files
That is, not a backup of the entire site (in this case, all my changes to the site in a couple of days would have been lost). AND ONLY these files. So they are the main reason for the WordPress white screen.
That helped.

If you have been using WordPress for a long time, you have probably encountered the “white screen of death” at least once. The reason why this moment upsets the user is that it is impossible to get into the admin area. And since the error text is not displayed on the screen in most cases, you remain in the dark about where the problem has crept in. The most unpleasant thing is that sometimes the problem affects only a certain part of the site, and you, for example, see a white screen only in the admin panel, but at the same time home page displays and functions as usual. Sometimes, this happens only for some record, and again, the rest works fine. In this article, we will tell you how to fix the white screen of death in WordPress, looking at several possible solutions.

Note: Before applying changes to your site, make sure you have a recent backup.

Why does this error occur?

Most often, a white screen means that you have reached your memory limit. This could be caused by a plugin that is working but not working correctly; the topic is written with errors; The problem may be with your hosting. Since a problem can be caused by several factors, it can have many solutions.

Does the problem affect your other sites?

If you have multiple websites, then the first thing you should do is check whether the white screen of death occurs on all of them, or on just one domain. If other sites are also not in order, this indicates problems with the hosting provider. However, if the problem is only on one of your sites, then you should look towards a plugin or installed template. If there is a problem with a specific blog post or page, then there is definitely a problem with a specific site.

Increasing the memory limit

Usually this problem happens because you have reached your memory limit.
I was migrating many client sites, and sometimes the memory limit error would pop up when activating a new plugin or performing other tasks. Typically the error looks like this:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx

To solve this, we open our wp-config.php file, located in the WordPress root folder. Then add the following code to the main php tag:

Define("WP_MEMORY_LIMIT", "64M");

We just increased the memory limit to 64MB. If the error persists, then contact your host. They will increase the limit in php.ini.

Disabling all plugins

If increasing the memory did not help, or you have a high limit such as 256MB or 512MB, then you should start step-by-step troubleshooting. In my experience with problems like this, it's usually a plugin or template issue. Go ahead and disable the plugins. You can do this according to the instructions:

If this method helped, then enable the plugins one by one.

Replacing the template with a standard WordPress template

If the plugin method does not help, then you should try changing your current template to the one that comes with the engine. The best way do this: backup the current theme folder, then delete it and the VI will automatically switch to the default theme.

Alternatively, you can go to phpMyAdmin and update the wp_options Database table. The following rows in the table need to be updated:

template, stylesheet, And current_theme. Change the value to twentyeleven.

If the problem with the white screen is resolved, then you need to look towards the file functions.php your topic. If you find empty lines at the end of the file, you need to erase them.

Other options

If none of the above helped, then you need to try reinstalling the WordPress engine. Sometimes it's not entirely obvious, but kernel files can become corrupted.
You can also use the debug feature in WordPress to see what type of errors are displayed on the screen. Add the following code to your wp-config.php file.

Error_reporting(E_ALL); ini_set("display_errors", 1); define("WP_DEBUG", true);

Once you've done this, the blank screen will display errors, warnings, and notifications. This will help determine where the bug’s legs are coming from :)

Sometimes you may have access to the admin area, but the site itself looks like an empty white canvas. This may be caused by a caching plugin. Just clear your cache.

If the white screen appears on very long entries, then you should also try clearing the cache.
You can also try the following: Either add the following code to wp-config.php, or in some cases to your web server's PHP.INI file.

/** Solution for large posts */ ini_set("pcre.recursion_limit",20000000); ini_set("pcre.backtrack_limit",10000000);

It is clear that all these errors are very nasty, so we hope that at least one of the methods helped you solve the problem with which you came to our blog. If you have other solutions, you are welcome to comment.



Loading...
Top