Are you gone mad suddenly looking at blank white screen instead of your WordPress site or admin panel? Sometimes, WordPress shows a blank white screen of death without any clue of what went wrong. It will easily make you nervous especially when you can not access the admin dashboard. If you are at this situation and come to this article then don’t get panic. Read on to fix the WordPress white screen of death issue and bring back your site in few minutes.
WordPress White Screen of Death
Since the issue could happen due various reasons, troubleshooting needs access to your hosting server. Therefore, make sure to have your login details for hosting account and FTP handy.
1. Check Server is Down
Server down could be the reason for the white screen. If you have another site hosted on the same hosting server, check whether it is accessible. Or else check your emails to confirm whether you received any server downtime notification from the hosting company. If server is up then the first important thing is to recall what were you doing just before your site went blank? Most probably you will be doing one of the following things:
- Activating / updating / modifying / installing a plugin
- Modifying your theme files like “functions.php”
These are the two major reasons causing white screen of death in WordPress.
2. Checking Plugins
If you were doing something with a particular plugin before the white screen appears then follow the below instructions to deactivate the plugin.
- Open a FTP client like FileZilla or use File Manager option in hosting account. Read more about using FileZilla to edit files in WordPress.
- Navigate to site’s root directory and locate “wp-content” folder.
- Open “plugins” folder and locate the folder of the plugin you were updating / modifying.
- Change the folder name to something you can identify later. For example if “wordpress-seo” plugin caused an issued rename it to “wordpress-seo_inactive”.
- Open a new browser window and try to login to WordPress admin dashboard. If you are able to login then the problem was caused by that particular plugin. Since you have renamed the plugin folder, WordPress will automatically deactivate it with an error “Plugin file does not exist”.
- Now change the name of the plugin through FTP or File Manager to its original name.
- Activate and update the plugin again from the dashboard or remove it completely if it is causing the same issue again.
If you are not sure what was the plugin you were working on before the white screen of death appeared then follow the below instructions:
- Login to a FTP client or File Manager and navigate to “wp-content” folder.
- Now locate the “plugins” folder and rename it something like “plugins_inactive”. This will deactivate all the plugins on your site.
- Return back to browser and login to your WordPress admin panel, if it works then navigate to “Plugins” menu.
- Activate the plugins one by one and check which one is causing issue and troubleshoot that plugin.
3. Theme Files
If you were modifying the theme files like “functions.php” before the white screen appears then follow the same instructions like above to modify the theme files.
- Login to a FTP client or File Manager and navigate to your site’s root directory.
- Locate “themes” folder located inside “wp-content” folder and find out your current active theme.
- Locate the php file you were modifying and change the code back to original.
- If you don’t know what code you had changed then replace the php file with original file from your backup or from the original theme.
- If you don’t want to replace the file (which will revert all your changes back to original theme) then change the theme folder name to something like (mytheme_inactive). This will deactivate the current theme and switch to default WordPress theme.
- Now you should be able to login back to WordPress admin panel and troubleshoot the required theme files again.
Before doing this action, make sure the default WordPress theme (like Twenty Twenty Two or Twenty Twenty Three) is available on your site. In case if you had deleted the default theme files, download it from WordPress themes repository and upload it in your site’s themes folder.
4. Memory Limit
If you did not do anything with plugins or themes before the white screen appears then try increasing the PHP memory limit of your WordPress by adding the following line to “wp-config.php” file located in root directory of your site. Read our article on editing “wp-config.php” file in WordPress.
/** Increase WordPress Memory Limit */
define('WP_MEMORY_LIMIT', '64M');
Your hosting company may have restrictions on PHP memory limit. Hence check with them before you change to 128M or anything more than that. They will be able to help modifying the memory limit in “php.ini” file for your WordPress installation.
5. Caching Problems
After correcting the plugin or theme you may still see your site shows white screen due to caching. Ensure to cleanup the cache when checking again.
- Delete your browser’s cache.
- Login to admin dashboard.
- Delete cached files from caching plugin.
- Open your site again.
You can also deactivate or delete caching plugin and check your site. If you have server level or CDN caching, make sure to purge them completely to access the pages from server instead of cache.
6. Debugging PHP Errors
If nothing works and still white screen is shown then you can enable debug mode to view the reason for the site not loading. It could be due to conflicts or mistakes in PHP code.
- Login to FTP client or File Manager from your hosting account.
- Locate “wp-config.php” file in site’s root directory.
- Change the “WP_DEBUG” value to true as shown below:
/** Enable Debugging Mode */
define(‘WP_DEBUG’, true);
- Save the file.
- Open your website in a browser window.
- Now you will see the parsing or syntax error explaining which line of the php file is causing the blank page.
Once you correct the error, the site will be back online again. For example, you might have mistakenly added empty spaces at the end of “functions.php” file or used wrong quotes in the code. This happens when you copy code from other websites and paste it on your site’s files. Debugging will show you the exact line number and file name from where the error comes so that you can easily fix the white screen. After fixing the error, make sure to change the “WP_DEBUG” value to false in “wp_config.php” file.
Final Words
WordPress needs core files, theme and plugins to work together and display the content from your database. Any mistakes in the backend PHP files will lead to white screen of death. The simple solution is to revert your previous action if you know it. However, you may not know what exactly happened on the site if plugins/theme/core WordPress files are automatically updated. Therefore, disable auto-updates to avoid unforeseen PHP problems. Finally, you can anytime enable debugging to find and fix the error.
2 Comments
Leave your reply.