Navigating to your WordPress site only to be met with the White Screen of Death (WSoD) can be a daunting experience. This error denies access to your site for both administrators and visitors, disrupting your website’s performance and user experience. Despite its prevalence, this common WordPress problem has a number of straightforward solutions.
In this post, we’ll cover what the WordPress white screen error is, outline the most common reasons for this issue, and detail the steps you can take to resolve it. Our goal is to help you get your site back to normal as quickly as possible.
Let’s dive in!
Contents:
The WordPress White Screen of Death, sometimes condensed to WSoD, is an infamous error that transforms your carefully crafted WordPress site into a plain white screen. This error stems from issues within your website’s PHP files or database. Depending on the cause, it can either blanket your entire website in white or selectively affect certain areas like your WordPress admin dashboard or individual web pages.
The white screen error may present differently in various browsers. In Google Chrome, it can come with an HTTP 500 error warning, while in Mozilla Firefox, it can simply appear as a blank screen.
Regardless of the browser you’re using, the error messages are not usually helpful in highlighting the actual problem.
The White Screen of Death typically results from PHP code errors and conflicts, PHP version incompatibility, memory limit exhaustion, misconfigured .htaccess files, or database errors. These problems can be triggered by a number of things, including unresponsive scripts that are interrupted by your hosting server or exceed your PHP memory limit.
One common cause is faulty or incompatible themes or plugins on your website. If your front-end isn’t working but your WordPress admin area is accessible, it’s likely a theme or plugin issue. You can quickly verify your admin panel by navigating to yoursite.com/wp-admin.
Other potential culprits include parsing or syntax errors in your code, issues with caching, corruption in your files, or server downtime. Though its roots may vary and identification can be tough, the good news is there are actionable steps to mitigate and solve this error, which we’ll explore in the following section.
Let’s take a look at twelve steps you can take to troubleshoot and fix the White Screen of Death in WordPress.
Before making any changes, be sure to backup your WordPress files and database to easily revert back if you experience any issues.
It may seem like a no-brainer, but the first step requires you to take a quick moment to think about any modifications you have recently made to your WordPress site. For example, installing a new plugin or theme, altering core files, or updating to the latest WordPress version.
This will help identify if any recent changes in your environment are causing the issue. Perhaps a newly installed theme isn’t compatible with your WordPress version or a plugin update is causing a conflict with another plugin or theme.
Checking for recent changes will help you figure out if an update or change you made triggered the white screen of death. Even better, you can pinpoint the exact tweak that’s messing with your site and work out how to fix it.
Remember: During the troubleshooting process website caching can be a major nuisance as it may prevent you from seeing recent changes you’ve made to the website. You may want to temporarily disable caching and place your website in maintenance mode while you are working on it. To circumvent some website caches and ensure that you are performing a proper refresh of the page consider adding a ?variable to the URL as you access the site like so:
hxxps://mybrokenwebsite[.]com?nocache
Didn’t help or no recent changes made? Let’s take a look at the type of white screen error you’re experiencing.
Before you go on a wild goose chase digging through error logs and whatnot, you’ll want to first confirm what HTTP response code your website is producing. This can save you a lot of time and you may discover that the fix is really quite simple.
First, load up your browser dev tools by pressing the F12 key on your keyboard, or by enabling it in your browser settings. This should display a new panel either at the bottom of your screen (Firefox) or the side (Chrome). Next, select the Network tab, which will allow you to see the response codes generated by the site. Now refresh the page and pay attention to the response code that is generated.
If the response code is 200, that means that the website is just loading a blank page. This typically indicates that there is either a blank index file present in your website, or that your theme files are missing. If this is the case, replace the index file (or remove the blank one if there is more than one) and double check that your theme files are present within wp-content/themes — if not, you can re-upload a new copy.
On the other hand, if the response code is 500 then proceed with the next steps.
WordPress has a built-in debugging system handy for troubleshooting. When activated, this system logs any errors that occur on your site, which may provide you valuable insight into what’s causing the white screen of death.
Here’s how you enable debugging and inspect the logs:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);
This code enables WordPress debugging and instructs WordPress to log any errors.
Enabling debugging and checking the error logs provide a direct insight into any problems happening behind the scenes without disrupting your site’s live version. Consider this your site’s “black box” that records any errors, making troubleshooting more effective.
Depending on your hosting environment, there may also be an error_log file present in the root directory of your website which should contain any recent PHP errors, warnings, or notices.
Plugins, while useful and (mostly) beneficial, can sometimes cause issues like the white screen of death. This next step involves disabling all your plugins to identify if any of them is behind the error.
Here’s how to temporarily disable your WordPress plugins to troubleshoot:
This step will deactivate all plugins and prevent them from running on your WordPress site.
If your site returns to normal, it indicates one of your plugins was causing the issue. To pinpoint the problematic plugin:
If you can’t reach your WordPress admin, don’t worry. You can still disable your plugins using an FTP client or your cPanel’s file manager:
If this step solves the problem, then it’s certain a plugin was at fault. You can reinstate the original name to your plugin folder, then rename each individual plugin’s folder inside it one by one until the issue shows up again. This way, you’ll discover the specific plugin causing the issue.
In some malware infections, bad actors are known to upload malicious plugins to the website to use as website backdoors or to inject malicious code into the environment. So if you’re experiencing a white screen error in WordPress, it’s definitely worth inspecting each plugin and removing any that don’t look familiar or have a suspicious name.
Plugins not the culprit? Move along to the next step.
Much like plugins, a WordPress theme — especially a newly installed or updated one — can sometimes cause the white screen of death. In this step, your goal is to temporarily revert to a default WordPress theme and see if this resolves the issue.
Here’s how you do it:
Now, check if your site is back to normal. If it is, your theme was causing the issue. Maybe it’s not compatible with a plugin you’re using or maybe the error coincided with a recent theme update.
If you can’t access the WordPress admin due to the WSoD or if you’re having other issues getting the theme changed, then the theme can be manually changed in the database. Hop into your database either with PHPMyAdmin in your cPanel or by uploading the Adminer script to your website’s root directory. You can log in using the details present in your wp-config.php file.
Change the following three wp_options values in the database:
They should have your current active theme listed there. Copy the current contents to a safe place and then replace them with a default theme name such as “twentytwentytwo” – just make sure whatever theme that you change it to is currently present in your ./wp-content/themes directory.
If you don’t have any other themes present you can download a fresh copy from the WordPress repository.
Once you are done with that, don’t forget to change the values back to what they were before and remove the adminer script for security reasons.
WordPress theme not the issue? Move along to the next step.
Sometimes, the white screen of death is due to your website exhausting its allocated memory. Scripts running on your website require memory to execute, and if these scripts require more memory than allocated, it could result in an error. This is why increasing the memory limit is a reasonable troubleshooting step.
Here’s how you increase the memory limit in WordPress:
define('WP_MEMORY_LIMIT', '256M');
This new line of code in wp-config tells WordPress to increase the PHP memory limit to 256MB.
Now, revisit your website to check if the problem has been solved. No dice? Move along to the next troubleshooting step.
Customizing HTML, CSS or PHP files of your WordPress site provides a high level of control. However, even a minor error or syntactical mistakes in the code can lead to a white screen of death. That’s why restoring recently edited files is an important troubleshooting step.
If you don’t have a recent website backup to conveniently restore from, here are the steps you can use to restore core, plugin, and theme files:
Please remember to always backup your site before you start editing files, and (ideally) test changes on a staging version. That way, you can prevent “live” problems and easily restore things if something goes wrong.
It’s always better to err on the side of caution when it comes to direct modifications to your site’s source files.
If all the previous troubleshooting steps have not been effective, sometimes a website can produce a 500 error WSoD due to the CMS, plugins or theme being incompatible with the PHP version in use on the server. This often happens to older websites which have not been updated for a while when their hosting provider updates the PHP version.
First thing’s first, search the exact PHP error that you are experiencing in your search engine of choice. Chances are other people have probably run into the same issue as you and attributed the culprit to the PHP version.
On the other hand, if you have recently upgraded PHP yourself try rolling that back to the previous version.
A misconfigured .htaccess file can bring a website down very quickly. Some WordPress plugins will make changes to the .htaccess file (especially security plugins) so it’s good practice to temporarily rename your .htaccess file and replace it with a default copy. The default .htaccess for a WordPress environment looks like this:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
If everything else is configured properly and the .htaccess was the culprit then this should bring your website back up. If this is the case then you will want to review which rules in the .htaccess file were responsible for bringing down the website.
Clearing the WordPress cache is a crucial troubleshooting step as it eliminates any issues that could stem from stored data on your server or local machine.
Caching is a process that stores static versions of your content, which significantly speeds up loading times for your site’s visitors. However, if a problem arises like the white screen of death, this stored data might be part of the problem. Clearing the cache also helps ensure any changes you make while troubleshooting are not hampered by this old data.
Here are general directions for browsers, the Sucuri firewall, and caching plugins.
Clearing your browser cache removes any stored data that’s been linked to the webpage.
For most browsers, you can access this option via the settings or history menu. It’s usually found labeled as ‘Clear Browsing Data‘ (Chrome) or Clear Recent History (Firefox). Make sure you select ‘cached images and files’ before clearing, then reload your site in your browser.
If you’re using a WordPress caching plugin (such as W3 Total Cache or WP Super Cache), navigate to the plugin’s settings in your WordPress dashboard. Look for an option labeled Clear Cache or Empty Cache. Click on it to clear your WordPress cache.
Clearing your website’s cache with the Sucuri Firewall is simple.
To clear all page and file cache at once, simply go to Performance -> Clear Cache – Global in Sucuri Firewall’s settings. Then click the green Clear Cache button.
After clearing your website and browser cache, check your WordPress site to see if the white screen error has been resolved.
In less common cases, malware can cause a white screen error in WordPress. Hackers can tamper with your website in numerous ways, from injecting harmful code into existing files to creating a wealth of malicious files. This illicit activity could provoke a 500 server error or a white screen of death.
Typical scenarios involving malware-induced errors include:
You can easily run a free website scan with the Sucuri SiteCheck remote website scanner. This tool will help you check your site for known malware, website errors, and other malicious code.
Remote scanners are not able to detect any malicious code found on the server level, however. To perform a comprehensive website scan, you can consider running a server-side scan to check for indicators of compromise and malware found on your site’s server as well.
That being said, identifying and removing the malware isn’t the final fix. If malware is the culprit, it’s equally important to determine how your site was infected in the first place and enhance protective measures. Regularly update your WordPress core, themes, and plugins, use strong passwords and login credentials, and set a frequent back up your site to avoid future attacks. You can also employ a web application firewall to help block bad bots, prevent hacks, and patch known software vulnerabilities.
If all other steps have failed to solve the issue, it’s time to reach out to your web hosting provider. These companies generally offer technical support and are well-equipped to help with issues like the white screen of death.
Here’s how to reach out to your host for help:
Hosting providers are responsible for maintaining the server where your website is hosted. They can check for server-level issues, such as memory leaks, server downtime, or issues with the server’s database software, which could cause the white screen of death. Their expertise and access to server logs make them a valuable ally in resolving complex WordPress issues.
WordPress errors can sneak up on you for a host of reasons — often due to misbehaving plugins, theme files, or code incompatibilities. If you have a recent backup of your website on hand, you can quickly dodge this bullet by reverting your site to its last known good configuration.
It’s also worth running a thorough scan of your website for any signs of compromise or malware. In some cases, malicious code is known to trigger syntax errors, disrupt the smooth execution of your scripts, and break legitimate website code, resulting in unwanted white screen issues.