WordPress untraceable white screen of death on migration

My problem was, after migrating a website to another server using backup buddy, I came upon a the white screen of death.

I turned on debug mode in WordPress and still no errors, just white screen.

Read More

So I tried removing all the files and re uploading them again and leaving the database as is (the one imported by BackupBuddy) but it’s still giving me white screen.

So I tried to trace the specific line where the white screen occurred and got stuck in a weird behavior.

In /wp-content/plugins/woocommerce/widgets/widget-init.php:

include_once('widget-cart.php');
include_once('widget-featured_products.php');
include_once('widget-layered_nav.php');
include_once('widget-price_filter.php');
include_once('widget-product_categories.php');
include_once('widget-product_search.php');
include_once('widget-product_tag_cloud.php');
include_once('widget-recent_products.php');
include_once('widget-top_rated_products.php');
  1. When I add a “die(‘boom’);” before
    “include_once(‘widget-price_filter.php’);” = boom is printed out.
  2. When I add a “die(‘boom’);” after
    “include_once(‘widget-price_filter.php’);” = boom is NOT printed
    out.

So it’s safe to say that the bug is inside widget-price_filter.php right?

The problem is when I add a die at the beginning of widget-price_filter.php, it does not print it out. It’s like the line where the error occurred is nowhere.

What could be the cause for this?

Related posts

Leave a Reply

1 comment

  1. So it’s safe to say that the bug is inside widget-price_filter.php right?

    Yes, totally (and you followed the correct way of debugging).

    The problem is when I add a die at the beginning of widget-price_filter.php, it does not print it out. It’s like the line where the error occurred is nowhere.

    If (as you say you’ve done) you have added die('HELLO'); right at the top (after the <?php) and it does not appear – this means there is one of two problems

    1. File not found
    2. A syntax error in that page.

    You can solve in 1 of three ways:

    1. Check the php error logs (if you have access)
    2. Before you call the “include_one” (in init.php) add:

      error_reporting(E_ALL);
      ini_set('display_errors', 'on');
      
    3. Completely empty the code (just leaving the <?php die('HELLO'); ?>, check that appears and then add code in bit by bit.

    If you got route 2, remember to take it out when you’ve got it working. Very important!

    +1 for actually taking time to try to solve it yourself before posting (with the echo and die). So I hope that helps with the rest.