As a seasoned WordPress developer, I’ve seen my fair share of the dreaded “White Screen of Death” (WSOD). If you’re not familiar with it, the WSOD is a frustrating issue where your website’s front-end displays nothing but a blank, white screen. This can be a nightmare for site owners, as it effectively renders your site useless and makes it impossible for visitors to access your content.
In this article, I am going to show you how you can fix these errors and get your website back to life.
Why does this happen?
There are a number of reasons that could happen, let’s discuss some of them.
- Memory Limit: If any script on your website takes too much time or your server times out, that can trigger WSoD.
- Incompatible Theme/Plugin: If you installed a new theme or plugin and your website went to WSoD that’s mean It’s not compatible with your previous installed theme or plugin.
- PHP Upgrade: If you (or your hosting) upgraded your php version and your site may have any old theme/plugins which is not compatible with the new php version, it may break your website as well.
- Missing Files: If your theme or plugin has missing files that also cause a white screen.
- Syntax errors: Syntax errors in your code can cause the WSOD. This can happen if you accidentally delete or modify a piece of code that is critical to the functioning of your site.
- Server issues: Sometimes, server issues can cause the WSOD as well. This can happen if there is a problem with your hosting provider, or if there is an issue with your server configuration that is causing your site to crash. Maybe you were following a tutorial and updated your .htaccess file.
How to fix WSoD?
1- Enable Debug Mode
If your website is showing a white page and the admin area isn’t working or you found the issue but are not sure where the error comes from, simply enable debug mode. This will show you any errors occurring on your website.
To do this, go to your website root directory and find “wp-config.php” and enable the debug mode true by default it’s false.
define( ‘WP_Debug’, true );
2- Disable your wordPress Plugins
If you can access your admin panel the easiest way to find the issue is to disable all of your Plugins. Often, the site goes down because of the bad plugin update.
If it works, activate plugins one by one to eliminate the plugin causing the issue.
3- Enable Default WordPress Theme
If the problem is not because of the plugin your WordPress theme may cause the WSoD. To see if this is the issue activate the default theme from Appearance > Themes in your Dashboard.
4- Increase Your Memory Limit
If you still see the WSoD or you get an error complaining about memory limits, you’ll need to assign more memory to the application.
There are several ways to increase the memory limit.
Find “wp-config.php” in the root directory and define the “WP_MEMORY_Limit”.
From your root directory find “.htaccess” and add the following line:
php_value memory_limit 64M
5- Increase the PHP Text Processing capability
Occasional, this problem might happen because of the particularly long posts or pages. If this is the case, you can try adjusting the PHP text processing capability on your site, by increasing the backtrack and recursion limits. To do so, paste the following code within your wp-config.php file:
Troubleshoot WSoD in WP engine
If you host your site with WP Engine, all PHP errors are logged automatically in the error log. To view your error logs, navigate to the Overview page for your website in the User Portal and select Error logs from the left-hand navigation.
The error log may also point to a configuration file like the .htaccess or wp-config.php file as the source of the issue. If this is the case, you can edit the file via SFTP to resolve the issue. Or, a white screen could be the result of an Allowed Memory Size error.
In conclusion, the White Screen of Death can be a frustrating issue for any WordPress site owner, but don’t panic. By following these troubleshooting steps, you can usually identify and fix the issue relatively quickly. And remember, if you’re ever in doubt, it’s always a good idea to consult with a WordPress developer or support team for additional guidance.
How we reviewed this article:
- Content Process
- I get an Idea
- Get feedback from fellow developers if they want a detailed post on it
- Research existing blog posts to see if there's a well written article on it
- Write the post
- Get feedback from colleagues, improve and publish!