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.
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');
- When I add a “die(‘boom’);” before
“include_once(‘widget-price_filter.php’);” = boom is printed out. - 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?
Yes, totally (and you followed the correct way of debugging).
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 problemsYou can solve in 1 of three ways:
Before you call the “include_one” (in init.php) add:
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.