No matter how hard you try to prevent them, mistakes happen when you’re browsing the web or running a website. But a good webmaster understands how to spot and troubleshoot these mistakes. How to Resolve wordPress White Screen Error?
One WordPress error that can cripple your WordPress website (and disrupt your business) is the WSOD (White Screen of Death). This annoying error needs to be fixed as soon as possible to get your website back up and running.
To fix the WSOD, you can follow the recommended checklist and use the right tools. But if you want to troubleshoot it yourself, follow along with me as I show you several effective ways to fix this dreaded error that could cripple your WordPress site.
What Is the White Screen of Death?
Let’s first understand this error and diagnose it. What is the White screen of death? As the name implies, a white screen is an empty page that appears in front of you when you are trying to log in to your WordPress site. It is the most frequent WordPress error and it is also the most annoying. Why is this error? First of all, this error does not provide any message and error code. A new user might be confused and frustrated when they see this error. Some browsers provide you with an HTTP 500 Error that says, “This page is not working.” But even this error message doesn’t solve the problem.
Note :- The white screen is related to database and PHP issues. It can be caused by plugin incompatibility, missing or corrupt theme file, server problem, or exceeding PHP memory limit.
What Causes the White Screen of Death Error in WordPress?
The White Screen of Death (WSoD) error can be caused by a variety of things, but there is no single cause. Most of the time, it is caused by PHP errors, PHP memory limit issues, database errors, plugins, themes, unresponsive scripts, etc.
However, troubleshooting WSoD is not an easy task. Figuring out the root cause of the error is not a simple task.
Some of the reasons for WSoD include:
1️⃣ Overrunning PHP memory limit
2️⃣ Unresponsive scripts
3️⃣ In some cases, WSoD can be caused by plugins or themes, which are not compatible with the software on the website.
WSoD can also be caused by a server issue, which can only be fixed by the host.
No matter what causes WSoD, don’t delay fixing it. Learn the quick fixes to remove this error in next section.
How to fix WSoD (White Screen of Death) in WordPress (9 methods)
So, let’s dive in and find out how to fix WordPress white screen of death error.
1 . Check for Server Availability
First, rule out an out-of-band server. An online status reporting tool like Is This Website down? can tell you whether the issue is due to full/crushed browser caching, IP problems, or an in-band hosting issue.
If the server is offline, contact your hosting provider to restore the server as soon as possible.
2 . Clear Your Browser Cache
Sometimes, all you have to do is clear your browser cache.
Web sites use browser caching to improve user experience and speed up your browsing experience. However, over time, the cache becomes cluttered with irrelevant data and cookies.
How do I clear my browser cache?
To clear your browser cache, go to the settings of your browser and click on the “Search” button.
Then, go to the “Cookies” section of the browser and click on “Cookies.”
Now, go to “Cookies and site data”, click on “Site Data”, and select “Cookies & site data”.
That’s where you’ll find all cookies and all site data.
Now go to Settings/siteData, click OK, and click OK.
Finally, go to Settings/SiteData, click OK.
To delete all cookies and cache data, go to Chrome's History tab and click "Clear browsing data." Go to "Basic" or "Advanced" and select "Time Range" and click "Clear data."
As soon as the process is complete, return to your website and click Refresh.
If you see wp-admin on your screen, you are ready to proceed. If the issue persists, proceed to the next step.
Note: The process mentioned above can also allow you to log off of websites where you have previously signed in or delete the information.
3. Enabling Debug Mode for WordPress
If clearing your browser cache doesn’t work, the next step is to allow WordPress to run in debug mode. In this mode, you’ll be able to see some important information about the bugs that could have caused the white screen of death in WordPress.
To enable WordPress in debug mode, you must first log in to your CPanel. After that, you can connect to your server using SFTP (FileZilla or similar FTP client).
If you're using Debian or Ubuntu find WordPress directory which is located in
# WordPress Directory in Debian
/var/www/wordpress
cd /var/www/wordpress
vi/nano wp-config.php
👉 In any text editor, open the file and search for the following line:
define (‘WP_DEBUG’, false)
👉 And change from false to true
define (‘WP_DEBUG’, true)
Please save the changes and export the new file. Now go back to your browser and refresh. The White Screen of Death will reappear, but this time it will be accompanied by an error message.
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 indicates that an error occurred at line 21 in a plugin. At this stage, you can either get in touch with the plugin provider or you can replace the plugin with a similar one. If that is not possible, you can disable the WordPress plugins completely.
You can also use plugins to debug your WordPress website. One of the plugins you can use to debug your WordPress site is WordPress query monitor.
4. Increase Memory Limit
If you are using a hosting panel like cPanel or CyberPanel, then you need to increase its php memory limit by going to your hosting panel and clicking on your domain.
But if you use Virtual Private Server. So for this you will have to increase the memory by editing your phpini file through command. We have given the command below for how you will edit it on Nginx and Apache server.
In Debian : The php.ini file is usually located in /etc/php/{PHP_VERSION}/fpm/php.ini for PHP-FPM. Replace {PHP_VERSION} with your installed PHP version. Example
sudo nano /etc/php/7.4/fpm/php.ini
; Set PHP memory limit php_admin_value[memory_limit] = 128M ; Set maximum execution time php_admin_value[max_execution_time] = 60 ; Set upload file size limit php_admin_value[upload_max_filesize] = 20M
Now go back to Wp-admin. Refresh the page and see if the error persists. If the error persists, proceed with the next method.
5. Disable the Theme and Plugin
Getting rid of plugins and themes is one of the easiest ways to get rid of the white screen of death, and most troubleshooting guides start by disabling plugins and themes. I included disabling plugins and themes later because it takes a lot of time and might change the look of your WordPress site in some way.
Let's see how to get rid of themes and plugins without damaging your WordPress site.
Disabling the Theme of Your WordPress
To disable or change the current theme on WordPress, follow the steps below:
✔️ Log into wp-admin
✔️ Go to Appearance
✔️ Click Themes
✔️ Activate the default theme.
If you can’t access the Wp-admin folder because of the Wp-DELETE error, use FileZilla to log in to your server and rename the Wp-content / Wp-themes folder as your “my_themes” folder.
Once you do this, the existing theme will be disabled and WordPress will use the default theme instead.
To find the best WordPress theme for you, you can check the repository of best WordPress themes and choose the one that best suits your needs. You can also read our guide on choosing the best WordPress theme to help you make the best choice.
Disabling the Plugins in Your WordPress
To disable plugins, follow the steps below:
✔️ Open the WordPress dashboard
✔️ Select Plugins to view the list of plugins installed
✔️ Select all plugins to disable.
✔️ Run them one at a time to identify the plugin that is causing the issue.
However, if you don’t have access to wp-admin and you can’t use FileZilla, re-name the plugins folder.
If your site starts to work, rename the plugins folder back to plugins.
After re-naming the plugins folder, start testing each plugin one at a time.
6. Resolve Syntax Errors
The functions.php file is often used by developers and website owners to add custom PHP code to add/optimise a specific functionality. In some cases, the code is used to integrate a third party service or to improve an existing feature because WordPress allows you to add custom code to your site.
However, custom PHP code can sometimes cause a White Screen of Death (WSOD). If you have made any recent changes to your functions.php file, reverting might help you get out of this situation and resolve any syntax code error.
The best way to add custom code is to keep track of every change you make to your functions.txt file. You can also keep backups of your original file to avoid similar issues.
7. Fix a Failed Auto-Update Issue in WordPress
Sometimes WordPress update issues lead to WSoD. Check if your site has an automatic update that failed. A timed-out server during an update can cause WSoD. To fix WSoD, you can connect to your site via FTP, open your site's root folder, and locate the.maintenance file. If you find it, delete it. The above steps will get rid of WSoD, but if you don't find the maintenance file, proceed to the next step.
8. Restore backup Your WordPress
It’s always a good idea to take backups and should do so on a regular basis. Another method to resolve the WordPress WSoD error is to reinstall a backup that was already up and running.
Platforms like WordPress allow you to set up staging sites and pull the data from those sites to your live site if you run into WSoD errors.
If you're in VPS and Want to Learn How to manage wordPress and Migrate it to new Server below is the Tutorial.
To fix the white screen error in WordPress, you need to take a step-by-step approach. First, check for error messages in the PHP logs and enable WordPress debugging for more insight. Next, disable plugins and switch to the default theme to determine the source of the issue. Next, increase PHP memory limit and verify file permissions to ensure smooth operation. Examine.htaccess for corruption and check core file integrity for possible issues. Next, investigate server-related issues, such as a PHP or database issue, and review server logs. Finally, clear browser cache. This step is often overlooked, but it is important to consider server memory limitations to avoid such errors.
By following these steps, you can systematically diagnose and resolve the root cause of your white screen error, thus ensuring a stable and working WordPress website. Additionally, regular backups and careful plugin/theme management help to maintain a resilient WordPress environment.