White Screen of Death (WSOD) error is the most common error for WordPress sites. It occurs when you are trying to load a page on your website, but the page is blank or the page content doesn’t display properly.
In this tutorial, we will show you how to fix White Screen of Death error in WordPress website and prevent it from happening again.
Table of Contents [TOC]
Are you seeing a blank page on your wordprress site after login? The White Screen of Death in WordPress is an issue where user see a white blank screen in wordpress site.
This article will introduce you to the most common solutions you can implement to fix wordpress shows blank page localhost error.
For those of you who have never encountered the white screen of death on WordPress admin, this article will shed more light on causes of white screen of death WordPress error and how to fix it in easy steps. A white screen can prevent you from accessing your WordPress dashboard, and even block the display of your site on the public side.
At first glance, everything seems lost, but keep the hope in you!
The white screen of death or blank wp admin page is one of the most common wordpress errors. There are plenty of issues such as website migration or after transferring to SSL that can cause the wsod error WordPress to appear. It can happen while a user attempts to login WordPress wp-admin. One of many reasons for this error is related to faulty plugins and themes, which can cause conflicts with some other file in your CMS.
The white screen can mostly appear due to a lack of memory or other issues related to your hosting server, as discussed below. Here is an example in Google Chrome. It actually gives us a warning saying “This page isn’t working and is unable to handle the request.” This is an HTTP 500 error which we will discuss in future posts. Also Read – 503 Service Unavailable Error
A white screen can prevent you from accessing your WordPress dashboard, and even block the display of your site on the public side.
Your site will fall painfully, especially if you rely on it to earn your income. Anything below it can cost you sales, leads, and revenue. The WordPress white screen of death error can become a big problem for you and your brand if visitors read it before you. This error usually has a simple origin. As long as you have a WordPress database backup and know where to look for and fix the problem, your site is doing well.
There are several factors that can generate a blank screen of death, but this usually comes from one of seven things:
The first two points are the most common culprits, and certainly the easiest to diagnose.
It can occur at various stages in different forms such as :
Before you start to Troubleshoot WordPress White Screen of Death, it’s important to stop (remember the yellow flag), take a deep breath, and take a few notes. Even if you end up asking for help from WordPress team, or on discussion forums, these notes will be helpful in solving your problem.No actual error message is generated, but you simply see a blank screen in wordpress.
If you have other WordPress sites installed on the same hosting account, you should start by checking if the problem also occurs on other sites.
If this is the case, it clearly indicates that something is wrong with your WordPress hosting service. This could be a temporary problem affecting their service, and you should seek their support for help.
On the other hand, if the problem only concerns a website or a specific part of that site, then you know that the problem concerns this particular website.
The majority of the time you see a blank screen of death, it means that a script on your website has exhausted the memory limit.
The unresponsive script is killed by your WordPress hosting server or simply times out. This is why no error message is generated and a white screen appears.
White screen of death- This error can also occur due to a badly coded theme or plugin installed on your site. Sometimes this can happen if there is a problem with your web hosting server.
Since the white screen error can be caused by a number of factors, WordPress white screen troubleshooting methods are required to resolve it.
Before you start, check recent actions performed:
You should know that even a minor update can bring a site to its knees, if the code has not been duly checked and tested to guarantee compatibility with WordPress or other plugins. This is why it is recommended to test plugin upgrades in a local work environment (on your computer), if possible.
When you install a new plugin, you add a small (or large) block of code to your WordPress site which, if deactivated unnecessary plugins are not properly tested, can generate a blank screen on your site.
In most cases, WordPress plugin test teams do a good job, and make sure that the plugins meet certain coding standards, but it’s nearly impossible to test all plugins, due to the huge volume of existing wordpress plugins, more than 43,000.
This figure does not take into account premium plugins that come from third-party sources like WooThemes or CodeCanyon.
More often than not, the white screen is only visible on the client side of your site. If you are able to access your WordPress dashboard, but no one can see your site, because only a blank wp-admin page is visible, then the problem is caused by a conflict in the theme. If you recently installed a new theme, start not going back to the previous theme, or activate the default WordPress theme that came with your installation.
You might also want to read – How to Scan & Detect Malware in WordPress Themes
It is common for hosts to report known issues either on a status page on their site, or through social networks like Twitter or Facebook. If in doubt, go to the site of your host and look for a page that could be called ” State of services”, for example.
Very often the simple question is to restore the site. To do this, you must have a backup of your site. Shockingly, not everyone backs up their site. Therefore, if you understand this and that one of these people who does not have an accessible reinforcement, this educational investigation exercise is for you.
In order to fix the problem, you need to find out where things went wrong. To do this, you must determine whether it was a conflict between subjects or between modules.
To get started, you’re going to need a few tools that you may already have.
An FTP client:
There are many free or paid FTP clients, we suggest you use Filezilla, which works on Windows, Linux and Mac, and which is also free. Be careful during installation, you don’t want to end up with “bonus” programs.
If the white screen of death is caused by a WordPress plugin or theme, then WordPress may be able to detect it.
The new fatal error protection feature introduced in WordPress 5.2 can sometimes detect the error and you may not even see a blank screen. Instead, you will see a message indicating that the site is experiencing technical difficulties.
You will also receive an e-mail message on your administrator’s e-mail address with the subject “Your site has a technical problem”.
This email indicates the plugin causing the error and will also contain a special link. This link will allow you to connect to WordPress recovery mode and deactivate the faulty plugin.
However, if you see the white screen of death with no messaging option or recovery mode, you need to correct the error manually.
Typically this error occurs because a script has exhausted memory and has stopped in the middle. To solve this problem, you need to increase the PHP memory available for WordPress. This will allow the script to use more memory to complete the job it was supposed to do. Memory issues also lead to other kind of errors too such as – Upload: Failed to Write File to Disk error, HTTP Image Upload Error in WordPress
To fix this, you can do one of two things, though both might be necessary.
First, you should adjust the memory limits. start with 64 MB.
There are three files in which you can make this change. Before doing so, make sure you save a copy of the files you choose to alter somewhere on your machine.
define('WP_MEMORY_LIMIT', '64M');
php_value memory_limit 64M
memory_limit = 64M
Save the changes, and now check your WordPress again.
Next, adjust the maximum execution time allowed.
There are two files in which you can change this:
php_value max_execution_time 60
max_execution_time = 60
Again, only one file needs to be edited.
Save changes. If the problem was in your server’s ability to handle the request size, this can resolve the issue.
The first step is to find the source of the problem. We must find the file that is causing the conflict, and then find the code block in that file where the syntax error is.
The first thing we should do is verify the templates or plugins that we have recently activated in our WordPress. If your syntax error appeared just after it was installed, that is the cause.
Fortunately, if you have no idea where the source of the error is, you can still easily trace its origin. When you open your site using any browser, you get the error message. The message begins with Parse Error Syntax Error Unexpected In WordPress, followed by specific error information. The error message will also contain the full path of the file responsible for the error, as well as the line where the faulty code is located. This is the file that you must modify to correct the syntax error.
Permission and ownership issues can still cause problems. Some specific files or folders may not be properly configured. The quickest way to remedy this is to click on the file or folder via FTP and directly modify their permissions with the following values: 755 for folders, and 644 for files (with very few exceptions).
We haven’t seen a white screen of death due to this, but permission and ownership issues can still cause problems. Who knows, in some circumstances, it may lead to a white screen of death! It is possible to fix WordPress File And Folder Permissions
Three simple rules For WordPress:
wp-config.php
file – 660, 600, or 644If you have SSH access to your server, run following command from the root WordPress directory.
sudo find . -type f -exec chmod 664 {} +
sudo find . -type d -exec chmod 775 {} +
sudo chmod 660 wp-config.php
If increasing the memory limit did not help or if you have a high memory limit such as 256M or 512M, you should start troubleshooting.
In our experience of solving this problem, we have always found that it was a specific plugin or a theme.
Let’s go ahead and disable all your plugins.
The first thing to do is return to your wp-content folder. This time, you need to rename the Plugins folder.
If you can still access the WordPress administration area, you can simply go to the Plugins »Installed Plugins page. Select all of the installed plugins, then select “Disable” from the “Global Actions” drop-down list.
However, if you do not have access to the WordPress administration area, you will have to deactivate all plugins via FTP.
Start by logging into your WordPress site using an FTP client. Once connected, go to the wp-content folder where you will see the ‘plugins’ folder.
Now you need to right-click on the plugins folder and then select rename. You can rename the plugins folder to plugin-deactivate.
Your FTP client will now rename the plugins folder.
WordPress is looking for a folder called plugins to load all plugins. When it can’t find the folder, it simply disables all plugins.
If that solves the problem, activate the plugins one by one. Once you have found the plugin causing the problem, you can replace it with an alternative or report the problem to the authors of the plugin.
If troubleshooting the plugin does not solve the error, try replacing your current theme with a default theme.
To do this, simply activate a default theme, such as Twenty Nineteen or twenty-twenty. Unfortunately, due to an error on your site, you will need to resolve the issue with your web host’s file manager (like cPanel’s File Manager) or use FTP or sFTP (it’s like a secure version of FTP). It is important to note that by changing the theme, you will not lose the parameters of your chosen theme.
The objective is to check if the error persists. If not, it’s anything but a matter of subject. Try to rename the organizer to their unique name after the investigation is complete.
If nothing has helped so far, the next step is to enable debugging in WordPress. This will allow you to see what type of errors are being generated. To enable debugging you’ll need to open wp-config.php
file .
Open the file and search for a line that reads:
define( 'WP_DEBUG', false );
change false to true.
If it isn’t not there, add the line: wp-config.php file
2 | define( ‘WP_DEBUG’, true); define( ‘WP_DEBUG_LOG’, true ); |
When talking about memory in WordPress, we usually refer to PHP memory. This memory is used by plugins and other files to execute scripts. PHP memory limitations are set by hosting companies.
As we have indicated before, this is a common cause of the appearance of the blank page or screen of death in WordPress.
Let’s see how we can expand this memory to check if this is the problem of our WordPress installation.
Keep in mind that some hosting will not allow you to modify PHP memory limits directly. In these cases, you will have to contact them to increase these limits. My recommendation is that you first request it to the hosting.
To increase PHP memory we will open our FTP client. Enter the server’s FTP address, username and password (this data is provided by the hosting company).
Next, we will go to the public folder of the hosting. If you work with a hosting company that works with CPanel (such as Webempresa or Raiola Networks), the public folder will be called public_html.
Enter the following line:
define ('WP_MEMORY_LIMIT', '64M');
Then check if the error persists or has been fixed. If it has not been solved, we will go to the next point.
Sometimes you can have access to the backend, but the front end of the site has the white screen of death. This can happen due to a cache plugin. Just clear your cache. Then comes the browser’s cache, it may seem too basic, but it is worth trying. Go to your browser settings and locate where browsing data is deleted where it allows you to delete history, cookies and temporary files.
Erase the data and wait for the process to finish. When finished, close and reopen the browser, and try to access your website again. Do you still see the white screen of WordPress death or WordPress Blank Page? Go to the next step.
Your WordPress files or database tables may be corrupted due to malware or another cause. Contact your web host and ask them to diagnose the problem. Also read – Optimize Repair WordPress Database – Fix Corrupted Tables
If you have a white screen of death only on a very long post or page, then this little trick might work.
This tip basically increases the word processing capacity of PHP by increasing the recursion and backspace limit. You can paste the following code into your wp-config.php file.
1 2 | /** Truc pour les articles long */ ini_set(‘pcre.recursion_limit’,20000000); ini_set(‘pcre.backtrack_limit’,10000000); |
This is another advanced step, but it is only recommended if and only if you know what you are doing. Mishandling in the database, and your entire site will be destroyed. You should exercise caution before making any changes to your site’s database.
Note: Be sure to have a recent backup of the database before making any changes.
If a WordPress error occurs while establishing a connection to a database, this is generally due to incorrect connection parameters in wp-config.php. If you are moving a website from an old hosting company, you will need to change it. Update the database name and password in your wp-config.php, for your database to function properly.
Another common source of error is transferring your WordPress files to a new host. The website is always displayed at the start, when you access the URL. However, once your old host has terminated your contract, if you have not transferred your database to the server of your new provider, your site will no longer be displayed. You receive the WordPress error message “Error while connecting to the database”.
The best way to avoid this failure is to immediately transfer the entire database to your new host. Update your wp-config.php file to access the new database. In this way, it is possible to safely cancel your old hosting account without losing data and be confronted with the dreaded WordPress error message “Error connecting to the database“.
Before undertaking error resolution, make sure you have a backup copy in your database by exporting your SQL file.
This error is different from the “database connection error” but is related to it . Sometimes the frontend of your site works perfectly but an error message appears. One or more tables in the database are not available and the database may need to be repaired.
Open your wp-config.php file and go to the section that defines your database name, username, password and host. Under host, define the following:
Define ('WP_ALLOW_REPAIR', true);
Now save your wp-config.php file and upload it via FTP. Look for the following url :
“Http://www.mysite.net/wp-admin/maint/repair.php”
You will see two options on the page. The first option is the “repair database” button and the second option is a “repair and optimize database ” button. At this point, you should make sure that you have created a full backup of your database.
Click on the “Repair WordPress Database” option and, once the repair process is complete, open a new tab in your browser. Now check if your site is displayed correctly.
Typos sometimes slip into it and even a tiny typo can cause an entire site to crash. All it takes is a bad underscore or an incorrect number in your database name, user name, or password to prevent you from accessing your website.
Most WordPress installations are done via a hosting control panel with an assistant. However, some users prefer manual installation. If you install WordPress without automatic help, you must also manually create your database. Be sure to enter your database name, username and password correctly. To be absolutely sure, you should use the copy and paste method. If you don’t know your user name, you can change your WordPress username with 3 Easy Ways.
However, be sure to copy only the text that you really need. Make sure you don’t copy spaces, as WordPress interprets this information as characters. Spaces cause errors when the installer attempts to connect to your database. Also, be sure to enter the information in the appropriate field during installation.
We know that this error is very frustrating and we hope that one of the tips above will correct the problem.
To prevent white screen of death error WordPress, you need to make sure your WordPress site is properly installed. To do this, follow these steps:
If you are terrified, it is justified. Everyone wants to prevent issues in WordPress. Recovering can take some time and intense effort. Don’t you like getting your hands dirty with the code? Try out WordPress security scanner and let it do the dirty work.
If you don’t want to spend a lot of time editing files, enable different plugins and many other things – we also have the easy solution for you.
Now that you know what to do if you encounter the WordPress white screen of death, Follow the below-given steps to prevent WSoD error in your WordPress site from happening again:
If your site is not working properly, you will need a backup to restore your site. It would be a shame to find after you encounter the white screen of death in WordPress and you have no daily or weekly backup to restore your site.
The backup must also be outside the blog and not on the same server as your blog, to avoid that the backed up files are themselves also infected or damaged. You can do this through a third-party service or plugin.
Also read – Export WordPress Database PhpMyadmin | WordPress Website Maintenance Checklist
When you update WordPress, it means that you made updates to the core, plugins, or themes, even if the process is automated. Notifications may seem redundant and tedious, but it can save you time troubleshooting the white screen of death.
Manually updating to new versions of WordPress versions, plugins or themes can become cumbersome after a while but if you are planning to do it then always do them first in a testing environment to verify there are no conflicts with anything else on the site.
Before making any changes to the code of your site, always perform it in a testing environment to ensure they won’t make any damage to your site.
Use web hosting that provides solid support 24/7, especially if you intend on working with the code of your website. Choose a hosting with comprehensive support that is not limited to the servers themselves, but also includes technical support to ensure proper operation of these applications.
Do you still have the themes you installed before deciding which one you would use on your business website? Always keep it updated and delete other unused plugins and themes because they can cause a problem to you WordPress.
If you are still not able to fix WordPress white screen of death or you are facing any other WordPress-related issue, you can get in touch with our expert support team to help you out. Get premium 24×7 support.