How to fix the 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 site, the developer is faced with an empty 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 deal with the problems that have arisen?

First of all, you need to understand what caused such an error, 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 refers to functions or special sections of code that are not present on your site.
  • The selected theme is incompatible 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 installation of the theme, as a result of which the site stopped working correctly. The output of a blank page was made so that site visitors would not see messages describing the error. This technique is called PHP Error Reporting (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 the creators of the site to a dead end.

Error display

The first thing you need to do in order to restore a WordPress theme is to try to read the error report that happened in the PHP files, which will allow you to determine what the problem was. Most websites have this setting turned off by default to prevent visitors from seeing the program code, however if your WordPress site becomes corrupted you will need to find out what caused this turn of events.

Open the FTP client and find your theme files (they are located in the /wp-content/themes/ folder). Add the following lines to the top 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.

Correction of files located on the server

Once you add the 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 nested in the server configuration, you still won't get anything on the screen. There are two most common reasons for this type of error to occur. Both reasons are related to the files located in the root directory of the site.

The first of these files, PHP.ini, allows you to override your site's settings. 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 it is the problem.

htaccess is the second file, editing which can also lead to server crashes. As with php.ini, back up this file and delete or rename it on the server. Perhaps this will help solve the problem.

Restoring the Default Website Theme

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

As soon as you rename or delete the ill-fated theme, your site should revert to the default theme. If it doesn't, the problem may be with the plugins, so you'll have to follow the same process to deactivate the plugins.

Deactivating WordPress plugins to restore the site

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

If you know approximately which of the plugins 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 of your theme, plugins, and server configuration. In such a situation, the most better solution is downloading the latest up-to-date version of WordPress from the official website and overwriting the files on the server.

Hi all. Recently, questions from users about the wordpress white screen of death have been pouring in. I got tired of answering everyone and decided to write a short article.

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

Page navigation:

wordpress white screen

The problem when the user sees white screen in wordpress instead of its own site is not new, and 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 the white screen may be crooked plugins and themes. For example, it is enough not to carefully insert the following code

And you are guaranteed to see a wordpress white screen.

wordpress white screen in admin

It’s bad when the client part of the site fell, but it’s even worse if we failed or they helped us to fill up the WordPress admin panel. In this case, access to the settings and the theme editor will be impossible.

Making a white screen in the wordpress admin is very simple, for example, you can edit the functions.php theme file, make a mistake in the code (forget to close the parenthesis or add an extra one) and save the changes. Voila, wordpress white screen error in the admin panel is provided to us. By the way, such a childish mistake cannot be cured without access to the site via FTP or a file editor from the hosting panel 🙂

What should I do if my wordpress website has a white screen?

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 fix the error.

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

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

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

Of course, examples can be given for a very long time and anyway, there is such a unique case that I have not described. For such cases, we have a Question / Answer section on the site, where you can write an error that your site produces, 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 soon as possible.

There are usually few reasons why a white page instead of WordPress may be displayed instead of a website.
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 problem site), write two lines: php_flag display_errors on php_flag display_startup_errors on
  • The third way for shared hosting - just ask technical support - how can I enable error reporting? 🙂 Since this is often done through the hosting control panel.

Errors in the work of the wordpress itself.

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

Define("WP_DEBUG", true);

Any other errors.

  • Another very popular mistake (especially when installing new themes or transferring sites) is that the site files are not fully uploaded. If you are very "lucky" then there will be just a white screen without any errors - and at least you crack! It helps only uploading files again.
  • Another white page may appear after editing the site files by an editor who does not know how to work correctly with the UTF-8 encoding. Treatment - redownload site files or restore from a backup.
  • If for some reason, instead of opening the usual wordpress administration pages, you get a blank page, you first 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, caching plugins can provoke a white page. In this case, you should find and clear the cache (usually the cache folder is located in /wp-content or /wp-content/caching_plugin_name) . ( Thanks comrade Spektra! )

by admin on August 26, 2011

Yesterday I ran into a problem with a blank page when entering a WordPress blog. That is, when I go to my site - a white empty page and nothing more. This problem among WordPress users is also called the “white screen of death”.

In my case a white page when entering the site was displayed when you write the site from WWW. When you write a site without WWW, the site was displayed normally.
That is, for example www .. And the site - everything is OK.
Empty page may also be displayed after you have published a post or activated a plugin. That is, instead of returning you to the admin page with confirmation of the changes, an empty page is displayed.
It also happens when neither the website nor the WordPress admin panel open at all. There is no error message, just a white screen.
Don't worry, all of 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 the 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 something else already installed in Vodpress
Solution: Disable the plugin and see if that 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 if the site is working.
4) You have updated the version of WordPress
Solution: Try updating WordPress again, if that doesn't help, see the previous paragraphs.

extra spaces wp-config.php

In my case the problem was extra spaces at the end of the wp-config.php file i.e. after ?> I had to remove all extra spaces.
This helped resolve the issue.

backup

With another site, everything turned out to be more complicated. I tried all the above solutions but it didn't work. 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 be lost). And ONLY these files. So they are the main cause of the WordPress white screen.
That helped.

If you've been using WordPress for a long time, you've probably experienced the white screen of death at least once. The reason why this moment is frustrating for 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 where the problem 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 main page displayed and functions normally. Sometimes, this happens only for one record, and again, the rest works fine. In this article, we will explain how to fix the white screen of death in WordPress by looking at several possible solutions.

Note: Before applying changes to the site, make sure you have a fresh backup.

Why does this error occur?

More often than not, a white screen means you've reached your memory limit. This may be caused by a plugin that works but is buggy; 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.

Is the problem affecting your other sites?

If you have multiple sites, then the first thing you should do is check if the white screen of death occurs on all of them, or just on one domain. If the rest of the sites are also out of order, this indicates problems with the hosting provider. However, if the problem is only on one of your sites, then you should look in the direction of a plugin or an installed template. If there is a problem with a particular 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 exhausted the memory limit.
I've been migrating many client sites, and sometimes the out-of-memory error popped up when activating a new plugin or doing other tasks. The error usually 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

For the solution, 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 troubleshooting step by step. In my experience of solving problems like this, it's usually a plugin or template. Go ahead and disable plugins. You can do it according to the instructions:

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

Replacing a template with a standard WordPress template

If the plugin method did 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 into phpMyAdmin and update the wp_options database table. You need to update the following rows in the table:

template, style sheet, and current_theme. Change the value to twenty-eleven.

If the problem with the white screen is solved, 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 wipe them out.

Other options

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

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

After you have done this, a blank screen will display errors, warnings, and notifications. This can help to determine where the legs grow from the error 🙂

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

If a white screen is displayed 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, in some cases, to your web server's PHP.INI file.

/** Large post solution */ ini_set("pcre.recursion_limit",20000000); ini_set("pcre.backtrack_limit",10000000);

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



Loading...
Top