How to Fix the White Screen of Death Error in WordPress (9 Methods)
Despite your best efforts to stop them, errors are inevitable when browsing the internet or managing a website. But a good webmaster knows how to assess the situation and troubleshoot effectively.
One of the many errors that can bring down a WordPress website (and significantly disrupt business) is the White Screen of Death (WSOD). This annoying issue requires an immediate fix to bring the website back online.
The White Screen of Death can be fixed simply by following the recommended checklist and using the appropriate tools. If you wish to troubleshoot this error yourself, follow along as I demonstrate several effective ways of fixing the White Screen of Death that could paralyze WordPress websites.
What Is the White Screen of Death?
First things first, let’s learn about this error and how to diagnose it. As the name suggests, the white screen of death is literally a blank page that appears out of nowhere when you try to access your WordPress website. It is the most common WordPress error and probably the most annoying one as well.
The worst thing about this error is that it does not give any message or error code, so a new user might gest frustrated and confused when it comes up. Some browsers may provide you with the HTTP 500 Error message that states, “this page isn’t working,” but even that error message does not explain the problem.
The white screen of death is associated with database and PHP errors. It may happen due to a plugin’s incompatibility, a missing or corrupted theme file, a server issue, or it may indicate that you have exceeded your PHP memory limit.
What Causes the White Screen of Death Error in WordPress?
There is no one fixed cause of the White Screen of Death error; however, it mostly occurs due to PHP errors, memory limit issues, or database errors. Troubleshooting a WSoD error is somewhat challenging, as figuring out the root cause is not an easy game.
Sometimes, it may appear due to plugins or themes that are incompatible with the software on your website. Also, when you’ve exceeded your PHP memory limit, an unresponsive script might lead to that blank screen. At times, WSoD may also appear due to a server issue that can be fixed by your host only.
Whatever the cause, one must not delay resolving the error. So, let’s learn the quick fixes to get rid of this error in the next section.
How to Fix the WordPress White Screen of Death (WSoD) Error (9 Methods)
Let’s get down to the brass tacks and learn the ways to fix the WordPress White Screen of Death error.
Check for Server Availability
Firstly, rule out the possibility of an unavailable server by using an online status reporting tool such as Is This Website Down?. This tool determines whether the problem results from a full/corrupted browser caching, IP issues, or an unavailable hosting server.
If the server is down, get in touch with your hosting provider to get it back online ASAP.
Clear Browser Cache
Sometimes, simply clearing the browser cache does the trick. Websites use browser caching for better user experience and faster browsing. However, as time passes, the cache gets cluttered with data and cookies that are no longer needed.
To resolve this issue, simply go to your browser’s settings and clear the cache of your specific website by going to all cookies and site data: [chrome://settings/siteData?search=cookie].
If you wish to remove all the cookies and cache, navigate to the History tab in Chrome and click “Clear browsing data.” Go to Basic or Advanced, select the time range, and click Clear data.
Once the process finishes, go back to your website and hit Refresh. If you see the wp-admin screen, you are good to go. If the problem is still there, jump to the next step.
Note: The above process can also log you out of the websites where you were previously logged in or remove the data.
Enabling Debug Mode
If clearing the browser cache does not help, the next fix is to enable WordPress to debug mode. This mode highlights some critical information about the errors that may have caused the White Screen of Death in WordPress.
You have to access the wp-config.php file to enable the debug mode. You can access this file either by logging into your CPanel or by connecting to your server via SFTP using FileZilla (or a similar FTP client).
- Open the file in any text editor and look for the following line:
- define (‘WP_DEBUG’, false)
- And change false to true.
- define(‘WP-DEBUG’, true)
- Save the changes and upload the updated file.
- Now return to the browser and refresh the screen.
- You will still get the White Screen of Death, but this time with an error message.
For example, you might see something like:
- Cannot redeclare get_posts() (previously declared in /var/www/html/wordpress/wp-includes/post.php:1624) in /var/www/html/wordpress/wp-content/plugins/my-plugin/my-plugin.php on line 21
The above error message states an error at line 21 in one of the plugins. At this point, you may either contact the plugin provider or replace the plugin with something similar. If that’s not possible, disable the WordPress Plugins altogether.
Increase Memory Limit
WordPress runs on top of PHP. As such, both layers need adequate memory for execution. Sometimes the limit gets exhausted, resulting in the White Screen of Death and 500 Internal Server errors.
Setting the memory limit is easy. Follow the steps below to set up the memory limit on Cloudways:
- Log in to your Cloudways account.
- Select your server.
- Click Settings & Packages. Check your Memory Limit under the basic tab and increase it.
- Click Save Changes.
- Now return to wp-admin, refresh the page and check if the error is still there. If you still see the White Screen of Death, move on to the next method.
Disable Plugins & Themes
Disabling plugins and themes is among the simplest solutions for the White Screen of Death, and many troubleshooting guides often include it as the first step. I’ve included it later as it is time-consuming and could possibly alter the appearance of your WordPress site.
Let’s see how to disable themes and plugins without causing any damage to the WordPress site.
Disabling the Theme
Follow the steps below to disable or change your current theme on WordPress:
- Log in to the wp-admin dashboard.
- Navigate to Appearance and click Themes.
- Activate the default theme.
If you cannot access the wp-admin due to the White Screen of Death error, access your server using FileZilla and rename the wp-content/themes folder to something like my_themes.
This will disable the existing theme, and WordPress will replace it with the default theme.
Disabling the Plugins
Follow the steps below to disable plugins via the WordPress dashboard.
- Open your WordPress dashboard.
- Click Plugins to see the list of installed plugins.
- Disable all of them.
- Activate them one after the other to see which plugin is causing the error.
However, if you cannot access wp-admin, use FileZilla again and rename the plugins folder. If your website starts working, rename the folder back to plugins and start testing each plugin individually by renaming them one by one.
Resolve Syntax Errors
Developers and website owners often add custom PHP code inside the functions.php file to add/optimize a specific functionality. Sometimes, the code is added to integrate a third-party service or to enhance an existing feature, as WordPress allows the addition of custom code.
The code can sometimes lead to the White Screen of Death error. So, if you have made any changes recently, reverting might get you out of this situation to resolve any syntax code errors.
The recommended practice for adding custom code is to note every change you make in the functions.php file. Better yet, keep backups of the original file to avoid such issues.
Fix a Failed Auto-Update Issue
WordPress update issues can sometimes result in the White Screen of Death error. Check to see if your site has a failed automatic update.
A timed-out server resulting during an update can trigger the WSoD error. You may resolve this by following the steps below:
- Connect to your server via FTP.
- Open your site’s root folder.
- Locate a file named .maintenance.
- If you find any such file, delete it.
Following the above steps will knock away the WSoD error, but if you can’t find the “maintenance” file, move on to the next solution.
Restore Backup
Taking backups is a good practice and should be performed regularly. Another way to fix the WordPress White Screen of Death error is to restore a previously working backup.
Contact Your Hosting Provider
If none of the above methods work, then the problem may be at your host’s end. In that case, contact your hosting provider for help.
Good support depends on your choice of hosting provider so ensure you opt for a reliable WordPress hosting provider that promises instant support.
How to Prevent the WordPress White Screen of Death Error
The solutions shared above in this blog may help you fix the White Screen of Death error, but wouldn’t it be amazing if it never occurred in the first place?
To prevent the WSoD error from happening, consider the following:
- Frequently backup your website and store it on a separate server. You can backup your server via a backup & restore plugin or a third-party tool or service.
- Abstain from installing untrustworthy plugins and themes. Always check customer reviews, ratings, and the recent update date of a plugin or theme before installing them. Only install frequently updated add-ons with favorable reviews, as they are unlikely to conflict with your site’s settings.
- It is recommended to test the WordPress updates in a staging environment to ensure that they don’t conflict with your site’s settings.
- When making any code changes, apply them first in a testing environment to ensure they don’t cause errors.
- Limit user permissions if multiple people have access to your site.
Summary
WordPress White Screen of Death error can leave many people confused and clueless about its root cause. Although it is not as scary as its name suggests, you can fix this annoying error by following the fixes shared in this guide.
There is no specific order in which you need to troubleshoot the error. Follow best practices to prevent this error, maintain timely backups, and contact your hosting provider for instant assistance.
Comments
Post a Comment