How to Fix WordPress’s White Screen of Death (WSOD): A Step-by-Step Guide
The white screen of death (WSOD) is undoubtedly one of the most common WordPress issues. It is also a frustrating error because there is no message, and you are locked out of WordPress, this message shows that even when working online, sometimes you can be locked out of your WordPress account without any message.
The other issue that is associated with the white screen of death error is that it may only manifest in specific sections of your site, sometimes. For instance, it is possible to encounter the white screen of death only when you are in the WordPress admin area but the rest of the site is functional. Other scenarios are various- you may only come across it once in a while or you may only notice it when it is on a specific post.
The cause of this problem can be attributed to plugin conflict, improper functioning of the theme, and PHP error. So if you are completely stuck and staring at a white screen wondering what to do, then fear not; below is a step by step solution for your problem.
This might be possible causes of encountering the WordPress White Screen of Death (WSoD) error:
- PHP code level errors
- Memory limit exhaustion
- Plugin and theme incompatibility
- Corrupted plugin or theme
- Server-level issues
1. Enable Debugging
Why It Helps: Enabling debugging in WordPress can reveal the errors causing the WSOD, making it easier to identify and fix the issue.
How to Do It:
- Access Your wp-config.php File: Connect to your site via FTP or your hosting provider’s file manager.
- Edit the File: Open wp-config.php and locate the line that says /* That’s all, stop editing! Happy blogging. */.
- Add or Modify the Following Lines:
- Save Changes: This configuration will create a debug.log file in your wp-content directory where errors will be logged.
- Check the debug.log File: Look for errors that could indicate the source of the problem. This file will give you clues about what might be going wrong.
2. Deactivate Plugins
Why It Helps: The WSOD often results from a malfunctioning plugin on the Windows operating system. Disabling them can make you know if it is the plugin causing the issue.
How to Do It:
- Access Your Site via FTP: Access using a FTP application or your hosting company’s file browser.
- Navigate to Plugins Directory: It is under wp-content folder and the directory is plugins.
- Rename the Plugins Folder: Renaming the folder to plugins_old, here we are only dealing with plugins in the new folder structure. This will disable all plugins to be more specific.
- Check Your Site: If you go to your site and the full plugins folder does not load, then rename the folder back to plugins and activate the plugins one at a time until there is that one plugin that causes the issue.
3 Switch to Default Theme
Why It Helps:At other times, it could be as simple as some issues with the previously engaged theme. Switching to the default theme for a while can assist you determine whether the issue is with the theme.
How to Do It:
- Access Your Themes Directory: Go to wp-content/themes.
- Rename Your Active Theme’s Folder: Rename the folder of the currently active theme to any name as, for instance, theme_old.
- Check Your Site: WordPress should automatically switch to a default theme like Twenty Twenty-One. If this resolves the issue, your theme may be causing the problem.
4. Increase PHP Memory Limit
Memory issues are the last reason for the white screen of death. The limit to 128 MB is set by default. It is possible to raise it if your site uses a lot of media and executes massive scripts.
- Fatal error: Allowed memory size to be exhausted.
- Fatal error: The characteristics in composed messages can be included in a fatal error.
To address this issue, it is advisable to change the extent of allowed memory. It allows the script to have more memory space and do some operations. You can use the file manager on the web hosting control panel to do this. The only difference between the two methods is how one gets to the files.
Increasing the Memory Limit Using the File Manager
- Access Your wp-config.php File:
- Use the File Manager on your hosting provider’s website or an FTP software to access your WordPress website.
- Open the public_html folder from where you installed WordPress.
- Edit the File:
- Find the file called “wp-config.php” and open it..
- Before the comment that states, insert the following line.
- php code
- Save Changes:
- Close and save the “wp-config.php” file.
- If the WSOD is caused by memory allocation, this will raise the RAM limit to 256 megabytes, which should help fix it.
Why It Helps
Yes, absence of memory component contributes to the WSOD. If the problem is related to the memory allocation then it could be solved by raising the PHP memory limit.
For further guidance, you can refer to tutorials on how to increase PHP memory in WordPress, such as the one provided by WPCode. This ensures that you correctly apply the changes and avoid potential issues.
5. Check Your Error Logs
Why It’s Useful: Your server’s error logs can provide specific details about what’s going wrong.
How to Do It:
- Access Error Logs:
You can usually find these through your hosting provider’s control panel.
- Look for Specific Errors:
Scan the logs for any error messages related to PHP issues, database problems, or server configuration