This phrase has long been a famous Internet meme: in any situation, keep calm and clear your cache! And the power of Drupal cache is really strong, because it can be helpful even in the case of so-called White Screen of Death or WSOD.
WSOD (White Screen of Death): oops, what is it?
From time to time, every Drupal user or developer encounters WSOD. One of the most common scenarios is it happens after some module or core updates, as well as during custom module development.
The page goes totally blank with no content, warnings or errors — just the big white “nothing”. It is whiter than the endless Arctic snow, and you just do not know how to find your way through it.
But, as stated above, keep calm! Of course there are ways to debug White Screen of Death. They include: enabling error reporting, checking error log files or Watchdog tables, disabling the modules that might have caused the problems, increasing your PHP memory limits if your site might have run out of it, restarting your web server, rebuilding your permissions and many more. You can try various methods one by one until some of them actually work.
In some cases, however, a perfect way to fix WSO is clearing the cache tables, which we will examine more closely.
Drupal cache clearing to resolve WSOD
Drupal caching is a great solution to improve a site’s performance. It helps avoid tons of calls to the database and save your server’s resources and time. When a page is loaded for the first time, Drupal saves its content, scripts, menu links and much more to the cache table and uses it again during the next page loads. Some modules, like the Big Pipe in Drupal 8, offer exceptional opportunities to get the best out of caching.
The caching tables have a multitude of things to handle. They can sometimes run into a problem due to various reasons. Often this happens when you are moving your site to another server. And then you have the scary WSOD!
But there is no need to worry — just empty the cache table. Though the task does not look easy with White Screen of Death, there are a couple of ways to do it without coding.
Clear the cache using the database
You can use PHPMyAdmin or other database administrative tool to get to your Drupal website database. Empty (truncate) the tables with the "cache_" prefix , without deleting them. Manipulations with the database should be done carefully.
Clear the cache using Drush
An alternative to this is using Drush command-line interface, which seems to often offer quick solutions when other things do not work. Even though Drush may be helpless sometimes as well, you could try these Drush commands for emptying the cache table:
drush cache-clear all or drush cc all — to clear all at once
drush cache-clear or drush cc — to choose which cache to clear
drush cache-rebuild or drush cr — to rebuild the website in addition to clearing the cache
Clear the cache using the Performance page
Another option to try is to get to admin/config/development/performance and use the "Clear all caches" button.
To wrap up
Clearing your cache might be enough to bring your website “back to life” again and help you resolve the White Screen of Death (WSOD) error. However, you can always rely on professional error-fixers and problem-resolvers like our affiliated Drudesk support service. Looking too pale is not good for your website’s health ;) The Drudesk guys will establish the reason for the WSOD or any other condition and will quickly make your website feel fine!